我使用sbt与playframework和activator构建一个webapp。 我的sbt版本是0.13.0
我将plugin.sbt文件更改为:
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
然后错误是:
F:\mysource\play-slick>sbt
F:\mysource\play-slick\project\plugins.sbt:9: error: eof expected but ';' found.
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.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?
我想知道如何在plugins.sbt中添加多个SbtPlugin?
答案 0 :(得分:9)
在.sbt
个文件中,设置之间必须有空行(请注意错误消息Ensure that settings are separated by blank lines.
)。所以,它应该是:
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
有关.sbt
个文件的详细信息,请参阅http://www.scala-sbt.org/0.13.1/docs/Getting-Started/Basic-Def.html。