0

我在我的项目中使用了 scoverage 插件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 覆盖有一个目录结构,其中包括 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 下载这个插件有什么原因吗(尽管它显然存在)

注意:代理解析适用于 ivy 风格版本和其他 maven 版本。

编辑:注意 I:不使用代理(直接来自 maven Central)的工件解析效果很好。这就是我得出的结论,代理配置中一定缺少某些东西。任何/所有指针都会有所帮助。注二:其他工件的解析(包括 sbt-assembly 插件、sbt 本身、scala-reflect 等与我的代理完美配合)

4

1 回答 1

0

将 Nexus 代理布局设置为允许关系

于 2019-06-26T14:25:49.790 回答