IDE_版本:
- IntelliJ IDEA Ultimate 2021.2.3
斯卡拉版本:
- 3.1.0
build.properties:
- sbt.version=1.5.5
库依赖项:
- libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.10"
- libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
插件:
- addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2")
- addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1")
集成/光盘:
- 特拉维斯 CI
- 工作服.io
当我在 sbt shell 中使用以下命令时,sbt clean test
一切正常。只要我coverage
之前激活test
并尝试通过 sbt 运行测试,我就会得到以下输出。
[IJ]coverage
[info] Defining ThisBuild / coverageEnabled
[info] The new value will be used by Compile / compile / scalacOptions, libraryDependencies
[info] Reapplying settings...
[info] set current project to my-project (in build file:/D:/Projects/my-project/)
[IJ]test
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run 'last update' for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.scoverage:scalac-scoverage-runtime_3:1.4.10
[error] Not found
[error] Not found
[error] not found: C:\Users\USER\.ivy2\localorg.scoverage\scalac-scoverage-runtime_3\1.4.10\ivys\ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-runtime_3/1.4.10/scalac-scoverage-runtime_3-1.4.10.pom
[error] Total time: 0 s, completed 04.11.2021, 16:23:17
我已经尝试降级所有版本的可见插件和依赖项以避免该问题。没有什么真正改变。
对我来说,当我激活覆盖时,sbt 似乎试图引用一个无法访问的库。在这种情况下,无论出于何种原因,它的 pom 文件scalac-scoverage-runtime_3\1.4.10\
都不存在。
有人对这个问题有想法吗?
谢谢你帮助我!