我分叉btce-scala,所以我可以在交易机器人上工作。我正在通过添加正常的sbt项目结构,制作build.sbt等来清理这个库:
~/code/scala/btce-scala) cat build.sbt
name := "btce-scala"
version := "0.1"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
scalaVersion := "2.10.3"
libraryDependencies ++= Seq(
"net.liftweb" % "lift-json_2.9.1" % "2.6-M2",
"org.specs2" %% "specs2" % "2.3.8" % "test",
"joda-time" % "joda-time" % "2.3",
"org.joda" % "joda-convert" % "1.6",
"commons-codec" % "commons-codec" % "1.9",
"com.typesafe.play" % "play_2.2.2" % "2.2.2"
)
我的问题是我不确定如何导入最新版本的Play框架。我需要它来使用play.api.libs.ws.WS
。
~/code/scala/btce-scala sbt run
[info] Set current project to btce-scala (in build file:/Users/bryangarza/code/scala/btce-scala/)
[info] Updating {file:/Users/bryangarza/code/scala/btce-scala/}btce-scala...
[info] Resolving com.typesafe.play#play_2.2.2;2.2.2 ...
[warn] module not found: com.typesafe.play#play_2.2.2;2.2.2
[warn] ==== local: tried
[warn] /Users/bryangarza/.ivy2/local/com.typesafe.play/play_2.2.2/2.2.2/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/play/play_2.2.2/2.2.2/play_2.2.2-2.2.2.pom
[warn] ==== Typesafe Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/play_2.2.2/2.2.2/play_2.2.2-2.2.2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.play#play_2.2.2;2.2.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.2.2;2.2.2: not found
...
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.2.2;2.2.2: not found
显然这是因为它无法找到Play_2.2.2,但我在哪里可以找到这个回购,所以我可以将它添加到sbt?
答案 0 :(得分:8)
你的依赖是错误的。请改用:
libraryDependencies ++= Seq("com.typesafe.play" %% "play" % "2.2.2")