我已成功使用了sbt-eclipse 3.0.0一段时间。最近我升级到Play 2.3.8,并需要升级到sbt-eclipse 4.0.0以避免这个问题。我尝试更新project/plugins.sbt,但在运行activator eclipse
时出现以下错误:
java.lang.NoSuchMethodError: com.typesafe.sbteclipse.core.EclipsePlugin$.EclipseKeys()Lcom/typesafe/sbteclipse/core/EclipsePlugin$EclipseKeys$;
at play.PlayEclipse$class.eclipseCommandSettings(PlayEclipse.scala:93)
at play.Play$.eclipseCommandSettings(Project.scala:17)
at play.PlayScala$.projectSettings(Project.scala:72)
at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
.....
我尝试在我的~/.sbt/0.13/plugins/plugins.sbt和project/plugins.sbt文件中只引用4.0.0版本,但这似乎没有任何区别。事实上,当删除两个引用时,我可以运行3.0.0版本的activator eclipse。我不知道 activator/sbt 在这种情况下是如何找到3.0.0插件的 - 也许我的错误是由于同时加载了3.0.0和4.0.0版本?
环境:
Play 2.3.8
Activator 1.3.4
Scala 2.10.4
~/.sbt/0.13/plugins/plugins.sbt是空的。
project/build.properties:
sbt.version=0.13.8
project/plugins.sbt:
// Comment to get more information during initialization
logLevel := Level.Info
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.6")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"