8

私はしばらくの間、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/"
4

3 に答える 3

4

Play プラグインのバージョンを次からアップグレードします。

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

に:

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

これはEclipseプラグイン4.0.0で動作します

于 2016-02-29T15:43:44.373 に答える
0

以下を削除しました

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

から

~/.sbt/0.13/plugins/plugins.sbt

project_root/project/plugins.sbt

これは私を助けました。

于 2015-09-28T21:02:41.930 に答える