gpt4 book ai didi

plugins - plugin.sbt 不能添加多个插件。

转载 作者:行者123 更新时间:2023-12-02 13:11:55 28 4
gpt4 key购买 nike

我使用 sbt 与 playframework 和 activator 来构建一个 Web 应用程序。我的 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?

最佳答案

.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")

有关 .sbt 文件的更多详细信息,请参阅 http://www.scala-sbt.org/0.13.1/docs/Getting-Started/Basic-Def.html .

关于plugins - plugin.sbt 不能添加多个插件。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20772936/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com