我使用 sbt 0.13
.
两者 https://github.com/typesafehub/sbteclipse和 https://github.com/typesafehub/sbt-idea建议为 ~/.sbt/plugins/build.sbt
添加一行.
因此我的 plugins/build.sbt
看起来像:
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
有了这个, sbt 不断失败并出现错误:
.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
有趣的是,两条线是分开工作的。
可以同时使用这两个插件吗?
最佳答案
根据 How build.sbt defines settings您需要在 Scala 表达式之间放置一个空行。
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
# blank line here
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
请注意,您需要 SBT
0.13.0
用于 sbteclipse 2.3.0
和 sbt-idea 目前用于 SBT 0.12.x
.
关于sbt - 错误 : eof expected?!如何在sbt中一起使用idea和eclipse插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18432683/