使用com.typesafe.play#sbt-plugin; 2.2.1:未找到SBT插件依赖项解析失败

时间:2014-03-06 19:47:21

标签: playframework sbt

我有一个Play应用,当我运行sbt时,我收到如下错误:

[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/play/sbt-plugin/2.2.1/sbt-plugin-2.2.1.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#sbt-plugin;2.2.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.play:sbt-plugin:2.2.1 (sbtVersion=0.13, scalaVersion=2.10)

但实际上,此插件的路径为http://repo.typesafe.com/typesafe/releases/com.typesafe.play/,而不是失败的审核http://repo.typesafe.com/typesafe/releases/com/typesafe/play

project / plugin.sbt 如下所示:

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

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

请告知。

2 个答案:

答案 0 :(得分:1)

最新版本的sbt插件似乎是2.2.0Migration guide says it),因此请更改您的plugins.sbt

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

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

答案 1 :(得分:1)

播放插件作为常春藤工件发布,而非maven工件。您需要以下内容:

resolvers += Resolver.typesafeIvyRepo("releases")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

请参阅此处的内容:http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/

请注意,Play的最新版本(以及插件) 2.2.2