【问题标题】:the plugin.sbt can not add more than one plugins.plugin.sbt 不能添加多个插件。
【发布时间】:2014-01-13 09:46:21
【问题描述】:

我使用 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?

【问题讨论】:

    标签: plugins build playframework-2.0 sbt


    【解决方案1】:

    .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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-17
      • 2012-08-08
      • 2011-06-04
      • 2013-04-26
      相关资源
      最近更新 更多