为什么SBT找不到Play 2.1插件?

Mar*_*ark 9 sbt playframework-2.1

在我的plugins.sbt档案中,我有

scalaVersion := "2.10.0"

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("play" % "sbt-plugin" % "2.1")  
Run Code Online (Sandbox Code Playgroud)

当我尝试跑步时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
Run Code Online (Sandbox Code Playgroud)

为什么SBT找不到这个插件?我也尝试addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1")过类似的结果.

Mar*_*ark 5

问题是在plugins.sbt文件中包含scalaVersion设置.这会导致sbt在应该实际搜索sbt-plugin_2.9.2_0.12时在存储库中搜索sbt-plugin_2.10.0_0.12.

我不确定在plugins.sbt文件中指定scalaVersion背后的语义,但也许它声明了SBT正在运行的Scala版本.

以下是Play 2.1 sbt-plugin文件的链接:http://repo.typesafe.com/typesafe/simple/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.1-RC1/srcs /