【问题标题】:How to configure sbt to publish to private nexus maven repo?如何配置 sbt 以发布到私有 nexus maven repo?
【发布时间】:2017-06-09 21:15:26
【问题描述】:
[error] (*:publish) java.io.IOException: PUT operation to URL http://corporate.nexus:8081/repository/snapshots/service/local/staging/deploy/1.0/foo-1.0.pom failed with status code 503: Service Unavailable [error] Total time: 23 s, completed Jun 9, 2017 12:09:15 PM

我在尝试使用 sbt publish 将我的 jar 发布到我的 nexus 存储库 3.13 maven 存储库时收到此错误。

我在 build.sbt 中有如下配置

publishTo := { 
 val nexus = "http://corporate.nexus:8081/repository/snapshots/"
  if (isSnapshot.value)
   Some("snapshots" at nexus + "content/repositories/snapshots") 
  else
   Some("releases"  at nexus + "service/local/staging/deploy/maven2")
}

credentials += Credentials("Nexus Repository Manager", "corporate.nexus:8081/", "admin", "admin123")

publishMavenStyle := true

我可以使用 maven 2 [ mvn deploy:deploy-file ] 推送 jar。但不是 mvn 3。

【问题讨论】:

    标签: sbt maven-2 maven-3 nexus3


    【解决方案1】:

    Nexus 的领域名称必须完全区分大小写“Sonatype Nexus Repository Manager”。不确定在哪里可以找到 Nexus 的确切名称,以及它是否因版本而异。这是为 Nexus 3 准备的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-19
      • 2019-04-05
      • 2017-06-18
      • 1970-01-01
      • 2020-10-19
      • 2017-09-18
      • 2017-02-18
      相关资源
      最近更新 更多