如何配置sbt以发布到私有nexus maven repo?

如何配置sbt以发布到私有nexus maven repo?,sbt,maven-2,maven-3,nexus3,Sbt,Maven 2,Maven 3,Nexus3,我在尝试使用sbt publish将我的jar发布到我的nexus存储库3.13 maven repo时遇到了这个错误 我在build.sbt中有以下配置 [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 stat

我在尝试使用sbt publish将我的jar发布到我的nexus存储库3.13 maven repo时遇到了这个错误

我在build.sbt中有以下配置

[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

我能够使用maven 2[mvn deploy:deploy file]推送jar。但不是MVN3

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

Nexus的域名必须完全区分大小写“Sonatype Nexus Repository Manager”。不确定在哪里可以找到Nexus的确切名称,以及不同版本的名称是否不同。这是Nexus3的

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