[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推送jar [mvn deploy:deploy-file]。但不是mvn 3.
答案 0 :(得分:0)
Nexus的领域名称必须与#34; Sonatype Nexus Repository Manager"区分大小写。不知道在哪里可以找到Nexus的确切名称,以及它是否因版本而异。这适用于Nexus 3.