8

I have been successfully using sbt-eclipse 3.0.0 for some time now. I recently upgraded to Play 2.3.8, and need to upgrade to sbt-eclipse 4.0.0 to avoid this problem. I tried updating project/plugins.sbt, but get this error when running 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)
    .....

I tried referencing 4.0.0 only in my ~/.sbt/0.13/plugins/plugins.sbt, then only in my project/plugins.sbt, but this seemed to make no difference. In fact, I'm able to run 3.0.0 activator eclipse when both references are removed. I have no idea how activator/sbt is finding the 3.0.0 plugin in this case - perhaps my error is due to loading both 3.0.0 and 4.0.0?

Environment:

Play 2.3.8
Activator 1.3.4
Scala 2.10.4

~/.sbt/0.13/plugins/plugins.sbt is empty

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/"
Adam Rabung
  • 5,232
  • 2
  • 27
  • 42
  • 2
    sbt 4.0.0 seems not to work with Play 2.3. Try updating to Play 2.4. See: https://github.com/typesafehub/sbteclipse/issues/221 – mhei Jul 02 '15 at 12:48
  • thanks @mhei - i searched for a long time to find compatibility info, but failed. – Adam Rabung Jul 06 '15 at 15:22

3 Answers3

4

The solution for me was to remove support for eclipse globally or in the project, since play already provides internal support for generating eclipse files. In fact, the 4.0.0 version of sbt-eclipse was the problem.

Mikaël Mayer
  • 10,425
  • 6
  • 64
  • 101
4

Upgrade your version of the play plugin from:

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

to:

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

This will work with eclipse plugin 4.0.0

ajp013
  • 173
  • 1
  • 6
0

I removed following

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

from

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

and

project_root/project/plugins.sbt

this helped me.

Hiren
  • 772
  • 9
  • 23