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

痞子三分冷 提交于 2019-12-22 03:15:34

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/18432683/error-eof-expected-how-to-use-idea-and-eclipse-plugins-together-in-sbt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!