在我的plugins.sbt文件中,我有
scalaVersion := "2.10.0"
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("play" % "sbt-plugin" % "2.1") 当我尝试运行sbt时,我得到了
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.10_0.12/2.1/sbt- plugin-2.1.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.10_0.12/2.1/sbt-plugin-2.1.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: play#sbt-plugin;2.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] play:sbt-plugin:2.1 (sbtVersion=0.12, scalaVersion=2.10)
[warn]
sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.1: not found为什么SBT找不到插件?我也尝试过addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1"),也有类似的结果。
发布于 2013-01-29 10:33:45
问题是在plugins.sbt文件中包含scalaVersion设置。这会导致sbt在存储库中搜索sbt-plugin_2.10.0_0.12,而实际上应该搜索sbt-plugin_2.9.2_0.12。
我不确定在plugins.sbt文件中指定scalaVersion背后的语义,但可能它声明了运行SBT的Scala版本。
以下是Play 2.1SBT插件文件的链接:http://repo.typesafe.com/typesafe/simple/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.1-RC1/srcs/
发布于 2013-02-06 21:37:10
根据文档,在您的project/plugins.sbt中添加以下内容
addSbtPlugin("play" % "sbt-plugin" % "2.1.0")更改project/build.properties
sbt.version=0.12.2https://stackoverflow.com/questions/14573574
复制相似问题