Unresolved dependency issue when compiling spark project with sbt - scala

I am trying to compile with sbt 0.13.8 a very simple spark project whose only function is
Test.scala
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
object SimpleApp {
def main(args: Array[String]) {
val logFile = "YOUR_SPARK_HOME/README.md" // Should be some file on your system
val conf = new SparkConf().setAppName("Simple Application")
val sc = new SparkContext(conf)
val logData = sc.textFile(logFile, 2).cache()
val numAs = logData.filter(line => line.contains("a")).count()
val numBs = logData.filter(line => line.contains("b")).count()
println("Lines with a: %s, Lines with b: %s".format(numAs, numBs))
}
}
The build.sbt file in the projet root is as follows:
name := "Test"
version := "1.0"
scalaVersion := "2.11.7"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.2"
resolvers ++= Seq(
"Apache Repository" at "https://repository.apache.org/content/repositories/releases/",
"Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
Resolver.sonatypeRepo("public")
)
The error return by sbt compile is:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: oro#oro;2.0.8: configuration not found in oro#oro;2.0.8: 'master(compile)'. Missing configuration: 'compile'. It was required from org.apache.spark#spark-core_2.11;1.5.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] oro:oro:2.0.8
[warn] +- org.apache.spark:spark-core_2.11:1.5.2 (/home/osboxes/Documents/bookings/Test/build.sbt#L7-8)
[warn] +- default:test_2.11:1.0
sbt.ResolveException: unresolved dependency: oro#oro;2.0.8: configuration not found in oro#oro;2.0.8: 'master(compile)'. Missing configuration: 'compile'. It was required from org.apache.spark#spark-core_2.11;1.5.2 compile
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:291)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:188)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:165)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:132)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:127)
at sbt.IvySbt.withIvy(Ivy.scala:124)
at sbt.IvySbt$Module.withModule(Ivy.scala:155)
at sbt.IvyActions$.updateEither(IvyActions.scala:165)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1369)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1365)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1399)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1397)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1402)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1396)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1419)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1310)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: oro#oro;2.0.8: configuration not found in oro#oro;2.0.8: 'master(compile)'. Missing configuration: 'compile'. It was required from org.apache.spark#spark-core_2.11;1.5.2 compile
How could I solve this dependency issue?
EDIT
I have followed the #mark91's advice:
change scala version to 2.10.5
change the spark dependency to libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.2.0-cdh5.3.2" % "provided".
However I still get an unresolved dependency in org.scala-lang#scala-library;2.10.4 :
[error] sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.4: configuration not found in org.scala-lang#scala-library;2.10.4: 'master(compile)'. Missing configuration: 'compile'. It was required from org.apache.spark#spark-core_2.10;1.2.0-cdh5.3.2 compile
Do you have any idea of why I get this problem?

Your problem is that Spark is written with Scala 2.10. So you should use version 2.10 of Scala instead of 2.11.
Example:
scalaVersion := "2.10.5"
libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.2.0-cdh5.3.2" % "provided"
resolvers += "Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/"

I had a similar dependency issue and solved it by reloading plugins and updating dependencies. I think your dependency issue is due to Ivy cache. Normally, if no dependency management configuration has changed since the last successful resolution and the retrieved files are still present, sbt does not ask Ivy to perform resolution.
Try running:
sbt reload plugins
sbt update
sbt reload
If that doesn't work, follow instructions on http://www.scala-sbt.org/0.13/docs/Dependency-Management-Flow.html

Same Reason as #mgaido: Using different version of Scala cause this problem.
But sometime, even we change later to correct version of scala, our cache still might have the older one. In that case we can delete ~/.ivy2 folder.

Related

Unresolved Dependencies sbt with play framework

As i am new to Stack Overflow please be patient i am working on a project with Play 2.5 exactly the starter example from the Website.
As i have to work with ebean i followed the Steps of Setting ebean in the plugins.sbt as like
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.0")
and also in my build.sbt file
name := """play-java"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
scalaVersion := "2.11.11"
libraryDependencies += javaJdbc
libraryDependencies += cache
libraryDependencies += javaWs
libraryDependencies += filters
libraryDependencies += evolutions
libraryDependencies ++= Seq(
"mysql" % "mysql-connector-java" % "5.1.18",
"org.webjars" %% "webjars-play" % "2.3.0",
"org.webjars" % "bootstrap" % "3.0.0" exclude("org.webjars", "jquery"),
"org.webjars" % "jquery" % "1.8.3"
)
but i get the following error output
Resolving com.typesafe.sbt#sbt-play-ebean;3.0.0 ...
[warn] module not found: com.typesafe.sbt#sbt-play-ebean;3.0.0
[warn] ==== local: tried
[warn] C:\Users\Dexter66\.ivy2\local\com.typesafe.sbt\sbt-play-ebean\scala_2.11\sbt_0.13\3.0.0\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-play-ebean_2.11_0.13/3.0.0/sbt-play-ebean-3.0.0.pom
[info] Resolving jline#jline;2.14.3 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13) (C:\Users\Dexter66\Desktop\Uebungsprojekte_Play\play-java-starter-examp
le-2.5.x - Kopie\plugin.sbt#L1-2)
[warn] +- play-java:play-java_2.11:1.0-SNAPSHOT
[info] Wrote C:\Users\Dexter66\Desktop\Uebungsprojekte_Play\play-java-starter-example-2.5.x - Kopie\target\scala-2.11\play-java_2.11-1.0-SNAPSHOT.pom
sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1488)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1484)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1519)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1517)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1522)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1516)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1539)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1466)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1418)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found
Cannot start with errors.
I also tried already the described way of File-->invalid caches/restart but also did not help
I think your problem is with the scala version of the sbt.
sbt 0.13 works with scala 2.10, and sbt 1.0 works with scala 2.12
all plugins that you use must be in the same scala version as the sbt
from this line:
com.typesafe.sbt:sbt-play-ebean:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)
I understand that you are using sbt 0.13.x, but somewhere set the scala version to 2.11.x
(maybe in project/build.sbt or project/plugins.sbt)
you shouldn't set the scala version in those files
to clarify, I'm not talking about the
scalaVersion := "2.11.11"
that you have in your build.sbt, it is fine.
I'm talking about the scala version of the sbt process it's self

How to run a sbt project in docker by using sbt-docker or writing a docker file manually?

I have been trying to learn to run a sbt project in docker. I also want to use spray.
I am following the example provided by sbt-docker in github:
https://github.com/marcuslonnberg/sbt-docker/tree/master/examples/package-spray
When i pull the project, it works fine and i could run the docker container as well.
There is a file inside project > project > PackageSprayBuild.scala
I dont know how this file is being used.
Also, the the given example doesnt have a plugins.sbt file.
Then i tried to create my separate project.
my plugins.sbt looks like this:
logLevel := Level.Warn
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.2.0")
my build.sbt looks almost identical to that of the example i mentioned above.
name := "demo-docker-sbt"
version := "1.0"
scalaVersion := "2.11.7"
resolvers += "spray repo" at "http://repo.spray.io/"
libraryDependencies ++= Seq(
"io.spray" % "spray-can" % "1.2.0",
"io.spray" % "spray-routing" % "1.2.0",
"com.typesafe.akka" %% "akka-actor" % "2.2.3")
enablePlugins(DockerPlugin)
// Make docker depend on the package task, which generates a jar file of the application code
docker <<= docker.dependsOn(Keys.`package`.in(Compile, packageBin))
// Define a Dockerfile
dockerfile in docker := {
val jarFile = artifactPath.in(Compile, packageBin).value
val classpath = (managedClasspath in Compile).value
val mainclass = mainClass.in(Compile, packageBin).value.get
val libs = "/app/libs"
val jarTarget = "/app/" + jarFile.name
new Dockerfile {
// Use a base image that contain Java
from("java")
// Expose port 8080
expose(8080)
// Copy all dependencies to 'libs' in the staging directory
classpath.files.foreach { depFile =>
val target = file(libs) / depFile.name
stageFile(depFile, target)
}
// Add the libs dir from the
addRaw(libs, libs)
// Add the generated jar file
add(jarFile, jarTarget)
// The classpath is the 'libs' dir and the produced jar file
val classpathString = s"$libs/*:$jarTarget"
// Set the entry point to start the application using the main class
cmd("java", "-cp", classpathString, mainclass)
}
}
Then i went into the terminal, inside the project and used command, "sbt docker" and then it gave me the following error:
[info] Resolving com.typesafe.akka#akka-actor_2.11;2.2.3 ...
[warn] module not found: com.typesafe.akka#akka-actor_2.11;2.2.3
[warn] ==== local: tried
[warn] /home/admin/.ivy2/local/com.typesafe.akka/akka-actor_2.11/2.2.3/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn] https://jcenter.bintray.com/com/typesafe/akka/akka-actor_2.11/2.2.3/akka-actor_2.11-2.2.3.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.11/2.2.3/akka-actor_2.11-2.2.3.pom
[warn] ==== spray repo: tried
[warn] http://repo.spray.io/com/typesafe/akka/akka-actor_2.11/2.2.3/akka-actor_2.11-2.2.3.pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.akka#akka-actor_2.11;2.2.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.akka:akka-actor_2.11:2.2.3 (/home/admin/IdeaProjects/demo-docker-sbt/build.sbt#L11-15)
[warn] +- default:demo-docker-sbt_2.11:1.0
sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor_2.11;2.2.3: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:291)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:188)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:165)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:132)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:127)
at sbt.IvySbt.withIvy(Ivy.scala:124)
at sbt.IvySbt$Module.withModule(Ivy.scala:155)
at sbt.IvyActions$.updateEither(IvyActions.scala:165)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1369)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1365)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1399)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1397)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1402)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1396)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1419)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1310)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor_2.11;2.2.3: not found
Questions:
1). What version of akka should in use here and what are the things i am missing for properly runnning a sbt project inside a docker container ? Is there something i need to change in my build.sbt docker configuration ?
my sbt is 0.13.8, scala 2.11.7
2) What is the use of that PackageSprayBuild.scala file in the example project, and why is there no plugins.sbt file used ?
3). Is it necessary that i must also define a main class inside the sbt project before the image is build inside the docker for the project ? Or can i simply build an image by providing build.sbt and plugins.sbt configurations ?
4). what would be the sample docker file, if i want to manually build a docker image for my sbt-project without using the sbt-native-packager or sbt-docker or sbt-assembly ? I have read the dockerfile reference, but cant precisely get an idea of how to define a docker file particulary for a sbt project. An example would be extremely helpful showing commands up to building the image as well as the contents of that docker file.
5). There seems to be multiple ways of running the sbt project inside the docker container. Which would be the best approach to achieve it and why ?
I want to use sbt with spray/play framework and run it in many containers.
I am using Lubuntu OS.
Take a look at DockerPlugin from SBT Native Packager Plugin
I know it is an old post, but I came across it while searching for docker plugins to sbt.
The problem as I see it with the build.sbt, there is a mix of scala version 2.10 and 2.11 lib dependencies.
To fix it either change the scala version:
scalaVersion := "2.10.x"
The double '%%' means you are importing a lib compiled with scala version mentioned in you build.sbt, and in your case that would be: scalaVersion := "2.11", which this lib version does not support.
If you intent to run the code with scala 2.11 then use the following libs:
libraryDependencies ++= Seq(
"io.spray" %% "spray-can" % "1.3.3",
"io.spray" %% "spray-routing" % "1.3.3",
"com.typesafe.akka" %% "akka-actor" % "2.4.8")
And in regards to the question mentioned about: Q > "file inside project > project > PackageSprayBuild.scala". Please refer to this http://www.scala-sbt.org/0.12.3/docs/Getting-Started/Full-Def.html: Which states that sbt is recursive, and it describes how to create build.scala files in the "project > project" directory.
I hope this helps others.

sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found

this is my build.sbt file under /sbt/0.13/plugins
scalaVersion := "2.11.5"
sbtVersion := "0.13.7"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.2.1"
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
I get
[info] Resolving com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT ...
[warn] module not found: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT
[warn] ==== local: tried
[warn] /home/cloudera/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.11/sbt_0.13/1.7.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[warn] ==== Sonatype snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11) (/home/cloudera/.sbt/0.13/plugins/build.sbt#L13-14)
[warn] +- default:plugins_2.11:0.1-SNAPSHOT
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
at sbt.IvySbt.withIvy(Ivy.scala:123)
at sbt.IvySbt.withIvy(Ivy.scala:120)
at sbt.IvySbt$Module.withModule(Ivy.scala:151)
at sbt.IvyActions$.updateEither(IvyActions.scala:157)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
this occurs with both the stable sbt-idea 1.6 and the snapshot of the 1.7.
No idea why and this was working until yesterday
You should split this config into two parts.
In your .sbt/0.13/plugins/plugins.sbt just put the lines
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
for the idea plugin.
Put the other lines in the build.sbt of your project.
The way you mix it you tell sbt to download a Scala 2.11 version of the plugin, which doesn't exist, and which you wouldn't want, as sbt itself was compiled with 2.10.

Unable to install sbt-eclipse plugin

I"m trying to install sbt-eclipse on but I keep getting the following error below when running sbt or sbt update.
error
[info] Loading global plugins from /home/atbyrd/.sbt/0.13/plugins
[info] Updating
{file:/home/atbyrd/.sbt/0.13/plugins/}global-plugins... [info]
Resolving org.scala-sbt#compiler-interface;0.13.1 ... [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
org.scala-lang#scala-library;2.10.3: configuration not found in
org.scala-lang#scala-library;2.10.3: 'compile'. It was required from
default#global-plugins;0.0 provided [warn]
:::::::::::::::::::::::::::::::::::::::::::::: sbt.ResolveException:
unresolved dependency: org.scala-lang#scala-library;2.10.3:
configuration not found in org.scala-lang#scala-library;2.10.3:
'compile'. It was required from default#global-plugins;0.0 provided
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213) at
sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122) at
sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121) at
sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116) at
sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116) at
sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104) at
sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51) at
sbt.IvySbt$$anon$3.call(Ivy.scala:60) at
xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98) at
xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
at
xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
at
xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
at xsbt.boot.Using$.withResource(Using.scala:11) at
xsbt.boot.Using$.apply(Using.scala:10) at
xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:102) at
xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62) at
xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52) at
xsbt.boot.Locks$.apply0(Locks.scala:38) at
xsbt.boot.Locks$.apply(Locks.scala:28) at
sbt.IvySbt.withDefaultLogger(Ivy.scala:60) at
sbt.IvySbt.withIvy(Ivy.scala:101) at sbt.IvySbt.withIvy(Ivy.scala:97)
at sbt.IvySbt$Module.withModule(Ivy.scala:116) at
sbt.IvyActions$.update(IvyActions.scala:121) at
sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1161)
at
sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1159)
at
sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1182)
at
sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1180)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35) at
sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1184) at
sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1179) at
sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45) at
sbt.Classpaths$.cachedUpdate(Defaults.scala:1187) at
sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1152) at
sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1130) at
scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at
sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42) at
sbt.std.Transform$$anon$4.work(System.scala:64) at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) at
sbt.Execute.work(Execute.scala:244) at
sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) at
sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) at
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) [error] (*:update)
sbt.ResolveException: unresolved dependency:
org.scala-lang#scala-library;2.10.3: configuration not found in
org.scala-lang#scala-library;2.10.3: 'compile'. It was required from
default#global-plugins;0.0 provided
~/.sbt/0.13/plugins/build.sbt
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
resolvers += "mvnrepository" at "http://mvnrepository.com/artifact/"
resolvers += Resolver.typesafeRepo("releases")
resolvers += Resolver.sonatypeRepo("releases")
resolvers += Resolver.sbtPluginRepo("releases")
cat ~/.sbt/0.13/plugins/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
The problem was related to compatibility problems. SBT isn't directly compatible with JDK 8. I was able to resolve this by adding the dependency below.
libraryDependencies += "org.scala-lang.modules" %% "scala-java8-compat" % "0.2.0"
I tried the "best answer" and it didn't solve my problem. I learned that I was simply using the wrong sbt version. When I installed sbt 0.13.11 instead, the plugin error was solved.

lift-json with scala 2.10

I am following the tutorial here and stuck with json-lift dependency.
This is the dependency in my plugings.sbt file:
addSbtPlugin("net.liftweb" %% "lift-json" % "2.4")
The error is below and it seems to be something related to scala 10.2 not being compatible but anyone know of a way I can get lift-json working with scala 10.2 ?
haknick '~/Projects/NickProjects/sometryouts/myscalatrys/scalatra/live-aq-first' --> scala -version
Scala code runner version 2.10.2 -- Copyright 2002-2013, LAMP/EPFL
haknick '~/Projects/NickProjects/sometryouts/myscalatrys/scalatra/live-aq-first' --> scala -version
Scala code runner version 2.10.2 -- Copyright 2002-2013, LAMP/EPFL
haknick '~/Projects/NickProjects/sometryouts/myscalatrys/scalatra/live-aq-first' --> sbt
[info] Loading project definition from /Users/kreshnikmati/Projects/NickProjects/sometryouts/myscalatrys/scalatra/live-aq-first/project
[info] Updating {file:/Users/kreshnikmati/Projects/NickProjects/sometryouts/myscalatrys/scalatra/live-aq-first/project/}default-7238ba...
[info] Resolving net.liftweb#lift-json;2.5 ...
[warn] module not found: net.liftweb#lift-json;2.5
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/net.liftweb/lift-json/scala_2.9.2/sbt_0.12/2.5/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/net.liftweb/lift-json/scala_2.9.2/sbt_0.12/2.5/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/kreshnikmati/.ivy2/local/net.liftweb/lift-json/scala_2.9.2/sbt_0.12/2.5/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/net/liftweb/lift-json_2.9.2_0.12/2.5/lift-json-2.5.pom
[info] Resolving org.scala-sbt#precompiled-2_10_1;0.12.3 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: net.liftweb#lift-json;2.5: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] net.liftweb:lift-json:2.5 (sbtVersion=0.12, scalaVersion=2.9.2)
[warn]
sbt.ResolveException: unresolved dependency: net.liftweb#lift-json;2.5: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:117)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:117)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:105)
at sbt.IvySbt.liftedTree1$1(Ivy.scala:52)
at sbt.IvySbt.action$1(Ivy.scala:52)
at sbt.IvySbt$$anon$3.call(Ivy.scala:61)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:61)
at sbt.IvySbt.withIvy(Ivy.scala:102)
at sbt.IvySbt.withIvy(Ivy.scala:98)
at sbt.IvySbt$Module.withModule(Ivy.scala:117)
at sbt.IvyActions$.update(IvyActions.scala:121)
at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:955)
at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:953)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$58.apply(Defaults.scala:976)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$58.apply(Defaults.scala:974)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:978)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:973)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:981)
at sbt.Classpaths$$anonfun$47.apply(Defaults.scala:858)
at sbt.Classpaths$$anonfun$47.apply(Defaults.scala:855)
at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
[error] (*:update) sbt.ResolveException: unresolved dependency: net.liftweb#lift-json;2.5: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
If you are using scala 2.11, add the following to your build.sbt:
libraryDependencies += "net.liftweb" %% "lift-json" % "2.6+"
lift-json is not a plugin, but dependency
you should be able to use it by defining:
libraryDependencies += "net.liftweb" %% "lift-json" % "2.5.1"
in your build.sbt file
Sbt file using Scala 2.11.8:
name := "Basic Lift-JSON Demo"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies += "net.liftweb" % "lift-webkit_2.11" % "3.1.0"