我正在尝试通过将其添加到plugins.sbt中来使用sbt-scapegoat:
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.0.4")
然后在build.scala文件中,我正在这样做:
import com.sksamuel.scapegoat.sbt.ScapegoatSbtPlugin.autoImport._
scapegoatVersion := "1.1.0"
这就是sbt-scapegoat github网站上显示的内容。我启动了sbt并让它解析sbt-scapegoat 1.0.4。到现在为止还挺好。然后,如果我运行替罪羊,我将得到:
[info] Resolving com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.10;1.0.0 ...
[warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/com/sksamuel/scapegoat/scalac-scapegoat-plugin_2.10/1.0.0/scalac-scapegoat-plugin_2.10-1.0.0.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn] module not found: com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.10;1.0.0
[warn] ==== local: tried
[warn] /Users/wmy965/.ivy2/local/com.sksamuel.scapegoat/scalac-scapegoat-plugin_2.10/1.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/sksamuel/scapegoat/scalac-scapegoat-plugin_2.10/1.0.0/scalac-scapegoat-plugin_2.10-1.0.0.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.10;1.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
1.0.0依赖来自哪里?我的项目是scala 2.11.7,我正在使用sbt 0.13.11。我没有在sbt-scapegoat网站上看到任何其他解析器的提法。
在我的输出中,控制台显示了许多发现的分析错误,但是生成的HTML文档基本上是空的,没有显示控制台上显示的错误。
我怎样才能解决这个问题?
要设置scapegoatVersion
子项目,您需要按此处所述将其置于常用设置中,或使用scapegoatVersion in ThisBuild := "1.1.0"
。为了避免该错误,我认为scalaVersion
在根项目中进行设置会起作用:
lazy val root = (project in file(".")).
aggregate(dotdash, dotdash_messages).
settings(
scalaVersion := "2.11.7"
)
或再次使用scalaVersion in ThisBuild
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句