我花了无数个小时试图让 Spray json 作为依赖项包含在我基于 scala 2.10 构建的 play 项目中。
有人可以为这个东西在项目文件中使用的确切魔法咒语提供明确的解释吗?!!!!!!
构建.scala:
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "linscot"
val appVersion = "1.0"
val appDependencies = Seq(
jdbc,
anorm,
"mysql" % "mysql-connector-java" % "5.1.18",
"com.cloudphysics" % "jerkson_2.10" % "0.6.3",
//"cc.spray.json" % "spray-json_2.9.1" %"1.0.1"
"io.spray" % "spray-json_2.10.1" % "1.2.5"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
//libraryDependencies += "io.spray" %% "spray-json" % "1.2.5"
)
}
得到这个:
[info] Updating {file:/Users/Joel/Projects/linscot-server/}linscot...
[warn] module not found: io.spray#spray-json_2.10.1;1.2.5
[warn] ==== local: tried
[warn] /Users/Joel/.ivy2/local/io.spray/spray-json_2.10.1/1.2.5/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: io.spray#spray-json_2.10.1;1.2.5: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] (*:update) sbt.ResolveException: unresolved dependency: io.spray#spray-json_2.10.1;1.2.5: not found
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/Users/Joel/Projects/linscot-server/}linscot...
[warn] module not found: io.spray#spray-json_2.10.1;1.2.5
[warn] ==== local: tried
[warn] /Users/Joel/.ivy2/local/io.spray/spray-json_2.10.1/1.2.5/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/io/spray/spray-json_2.10.1/1.2.5/spray-json_2.10.1-1.2.5.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: io.spray#spray-json_2.10.1;1.2.5: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] (*:update) sbt.ResolveException: unresolved dependency: io.spray#spray-json_2.10.1;1.2.5: not found