2017-06-09 78 views
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發佈將我的jar發佈到我的nexus存儲庫時出現此錯誤3.13 maven回購。如何配置sbt發佈到私人nexus 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部署:部署文件。但不是mvn 3.

回答

0

Nexus的領域名稱必須完全是「Sonatype Nexus Repository Manager」區分大小寫。不確定在哪裏可以找到Nexus的確切名稱,以及每個版本的版本有所不同。這是用於Nexus 3.