12

I use sbt 0.13.

Both https://github.com/typesafehub/sbteclipse and https://github.com/typesafehub/sbt-idea suggest to add a line for each to ~/.sbt/plugins/build.sbt.

Thus my plugins/build.sbt looks like:

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")

With that, sbt keeps failing with the error:

.sbt/0.13/plugins/build.sbt:2: error: eof expected but ';' found.
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
^
[error] Error parsing expression.  Ensure that settings are separated by blank lines.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? zsh: exit 130   sbt

Interestingly, both lines work seperately.

Is it possible to use both plugins?

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
bruce
  • 227
  • 4
  • 7

1 Answers1

24

According to How build.sbt defines settings you need to put a blank line between Scala expressions.

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
# blank line here
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")

Note that you need SBT 0.13.0 for sbteclipse 2.3.0 and sbt-idea is currently for SBT 0.12.x.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
Schleichardt
  • 7,502
  • 1
  • 27
  • 37