SBT忽略代理存储库

时间:2018-01-15 23:28:05

标签: scala playframework sbt

我有一个自定义repositories文件,指向我们内部的Nexus回购:

[repositories]
  local
  ivy-proxy-releases: https://nexus.ci.build.org.internal:8443/repository/ivy-public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-proxy-releases: https://nexus.ci.build.org.internal:8443/repository/maven-public/
  maven-proxy-snapshots: https://nexus.ci.build.org.internal:8443/repository/maven-snapshots/

这一切都非常标准,但我可以从输出中看到SBT首先连接到Proxy存储库,然后尝试与外部存储库通信:

[SUCCESSFUL ] org.scala-sbt#test-agent;0.13.16!test-agent.jar (154ms)
downloading https://nexus.ci.build.org.internal:8443/repository/maven-public/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
    [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (15ms)
downloading https://nexus.ci.build.org.internal:8443/repository/ivy-public/org.scala-sbt/apply-macro/0.13.16/jars/apply-macro.jar ...
...
[0m[[0minfo[0m] [0mResolving com.typesafe.play#sbt-plugin;2.6.6 ...[0m
[A
[2K[0m[[0minfo[0m] [0mResolving com.typesafe.play#sbt-plugin;2.6.6 ...[0m
[0m[[31merror[0m] [0mServer access Error: Connection timed out (Connection timed out) url=https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.6.6/ivys/ivy.xml[0m
[0m[[31merror[0m] [0mServer access Error: Connection timed out (Connection timed out) url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.6.6/ivys/ivy.xml[0m
[0m[[0minfo[0m] [0mResolving com.typesafe.play#sbt-routes-compiler_2.10;2.6.6 ...[0m
[A

现在为什么?即使在这种情况下,com.typesafe.play在我们的Nexus中不存在,那么SBT是否应该失败并且不会转到任何外部存储库?

1 个答案:

答案 0 :(得分:0)

Ivy和sbt是内置的解析器。我不确定他们的网址是否可以覆盖。您可以尝试将服务器作为附加解析器添加到repo中,而不是覆盖它们吗?

最坏的情况是,您可以直接提供罐子。