1
[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 repo 时出现此错误。

我在 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。

4

1 回答 1

0

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

于 2017-06-13T22:51:56.257 回答