【发布时间】:2015-09-16 05:29:20
【问题描述】:
我已经成功使用 sbt-eclipse 3.0.0 一段时间了。我最近升级到 Play 2.3.8,需要升级到 sbt-eclipse 4.0.0 以避免this problem。我尝试更新 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 中引用,但这似乎没有什么区别。事实上,当 both 引用被删除时,我可以运行 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/"
【问题讨论】:
-
sbt 4.0.0 似乎不适用于 Play 2.3。尝试更新到 Play 2.4。见:github.com/typesafehub/sbteclipse/issues/221
-
感谢@mhei - 我搜索了很长时间以找到兼容性信息,但失败了。
标签: eclipse playframework-2.3 typesafe-activator sbteclipse