scala 错误-堆栈跟踪被抑制;运行最后一个宏/更新完整输出

goucqfw6  于 2023-10-18  发布在  Scala
关注(0)|答案(1)|浏览(110)
sbt:scalatutorial> run
[info] Updating
[info] Resolved  dependencies
[warn]
[warn]  Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last macros / update for the full output
[error] (macros / update) sbt.librarymanagement.ResolveException: Error downloading org.wartremover:wartremover_2.13.11:3.0.6
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\username\.ivy2\localorg.wartremover\wartremover_2.13.11\3.0.6\ivys\ivy.xml
[error]   not found: 
https://repo1.maven.org/maven2/org/wartremover/wartremover_2.13.11/3.0.6/wartremover_2.13.11-3.0.6.pom
[error] Total time: 2 s, completed 2023. 8. 31. ?ㅽ썑 3:21:19
sbt:scalatutorial> addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.0.6")
[error] Expected ID character
[error] Not a valid command: addSbtPlugin (similar: plugin, plugins)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':'
[error] Expected key
[error] Not a valid key: addSbtPlugin (similar: sbtPlugin, discoveredSbtPlugins)
[error] addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.0.6")
[error]

我应该怎么做这个错误发生?
谁说你的wartremover版本是旧的,所以更新它。
对不对?或者如何解决这个问题?
在哪里使用addSbtPlugins?

fkaflof6

fkaflof61#

Wartremover从3.1.3开始支持2.13.11-参见MVN Repository。作为一个编译器插件,它不能像普通库那样针对所有2.13.x版本,而是针对特定的次要版本。Scala的更新几乎总是意味着Wartremover的更新。
Sbt插件被添加到.sbt文件中,但不是在项目的根目录中,而是在project/目录中,按照惯例是project/plugins.sbt

相关问题