2014-12-11 85 views
1

我試着爲我的項目做oss.jfrog.org的mvn deploy。但是我得到這個錯誤:部署SNAPSHOT到oss.jfrog.org(JCenter)

Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://oss.jfrog.org/simple/oss-snapshot-local/com/myorg/mylibrary/com/myorg/mylibrary/0.0.1-SNAPSHOT/mylibrary-0.0 
.1-20141211.050111-1.pom. Return code is: 409, ReasonPhrase: Conflict. 
     at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:573) 
     at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:493) 
     at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:474) 
     at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:454) 
     at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:871) 
     ... 28 more 

當我看進JFrog資源庫瀏覽器,我可以看到,罐子有枝條正確的版本,這可能是這個錯誤,爲什麼甚至反正部署罐子有這個錯誤?

這裏是我的POM設置:

<distributionManagement> 
    <repository> 
     <id>bintray-myorg-maven-mylibrary</id> 
     <name>artifactory-snapshots</name> 
     <url>http://oss.jfrog.org/simple/oss-snapshot-local/com/myorg/mylibrary/</url> 
    </repository> 
</distributionManagement> 

難道是因爲bintray-* ID的?

+0

這可能是http://stackoverflow.com/questions/12734788/maven-deploydeploy-file-fails-409-conflict-yet-artifact-uploads - 成功 你嘗試過嗎? – Hilikus 2014-12-11 05:41:06

回答

4

simple不應該是您網址的一部分。 Artifactory認爲simple是存儲庫的名稱,oss-snapshot-localgroupId的一部分。由於POM顯示了不同的groupId,因此它以409失敗。

+0

感謝您的提示。我設法通過使用' http://oss.jfrog.org/artifactory/oss-snapshot-local'和id與maven settings.xml相同來上傳它 – xybrek 2014-12-11 15:59:54