我在项目project/plugins.sbt
中使用了覆盖插件:
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
当我不使用我们公司的联系时,此方法会很好地解决。
要测试我们的关系代理,我在下面的~./sbt/repositories
中添加了
[repositories]
local
maven-releases: https://repo.example.net/nexus/repository/proxy-central.maven.org/
ivy-releases: https://repo.example.net/nexus/repository/proxy-repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
sbt-plugin-releases: https://repo.example.net/nexus/repository/proxy-repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
我删除~./ivy2/cache
并在尝试编译时:
[warn] ==== maven-releases: tried
[warn] https://repo.jamba.net/nexus/repository/proxy-central.maven.org/org/scoverage/sbt-scoverage_2.12_1.0/1.5.1/sbt-scoverage-1.5.1.pom
[warn] ==== ivy-releases: tried
[warn] https://repo.jamba.net/nexus/repository/proxy-repo.typesafe.com/typesafe/ivy-releases/org.scoverage/sbt-scoverage/scala_2.12/sbt_1.0/1.5.1/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.jamba.net/nexus/repository/proxy-repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scoverage/sbt-scoverage/scala_2.12/sbt_1.0/1.5.1/ivys/ivy.xml
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scoverage#sbt-scoverage;1.5.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.scoverage:sbt-scoverage:1.5.1 (scalaVersion=2.12, sbtVersion=1.0)
我注意到sbt coverage具有目录结构,其中包括scala和sbt版本:https://repo1.maven.org/maven2/org/scoverage/sbt-scoverage_2.12_1.0/1.5.1/sbt-scoverage-1.5.1.pom
我还尝试将project/plugins.sbt
更改为无效:
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1", scalaVersion="2.12", sbtVersion="1.0")
我的Maven代理是否没有从Maven Central下载此插件(尽管它显然存在)是有原因的
注意:代理解析适用于常春藤样式版本和其他Maven版本。
编辑: 注意I:无需使用代理(直接从Maven Central)就可以解决工件的完美工作。这就是我得出的结论,代理配置中肯定缺少某些内容。任何/所有指针都会有所帮助。 注意二:其他工件的解析(包括sbt-assembly插件,sbt本身,scala-reflect等与我的代理完美配合)