Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: eof expected?! How to use idea and eclipse plugins together in sbt?

Tags:

sbt

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?

like image 526
bruce Avatar asked Aug 25 '13 19:08

bruce


1 Answers

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.

like image 71
Schleichardt Avatar answered Oct 12 '22 12:10

Schleichardt