我已经成功使用 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 中引用 4.0.0,然后只在我的 project/plugins.sbt 中引用,但这似乎没有什么区别。事实上,当两个引用都被删除时,我可以运行 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 为空
项目/build.properties:
sbt.version=0.13.8
项目/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/"