我想为play-json
sbt项目添加依赖项.
我在project/plugins.sbt
以下位置添加了Typesafe存储库:
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
然后我添加了play-json
依赖Build.scala
如下:
libraryDependencies += "com.typesafe.play" % "play-json_2.10" % "2.2.1"
有了这个,我得到如下错误:
[warn] module not found: com.typesafe.play#play-json_2.10;2.2.1 [warn] ==== local: tried [warn] /home/tminglei/.ivy2/local/com.typesafe.play/play-json_2.10/2.2.1/ivys/ivy.xml [warn] ==== sonatype-snapshots: tried [warn] https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/play-json_2.10/2.2.1/play-json_2.10-2.2.1.pom [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/com/typesafe/play/play-json_2.10/2.2.1/play-json_2.10-2.2.1.pom [info] Resolving org.scala-tools.testing#test-interface;0.5 ... [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: com.typesafe.play#play-json_2.10;2.2.1: not found [warn] ::::::::::::::::::::::::::::::::::::::::::::::
如何整理出来?
由于依赖项不是插件,因此您只应将resolvers
设置添加到build.sbt
项目的主目录中.
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
project/*.scala
这样一个简单的配置你真的不需要文件.