Deploy SNAPSHOT to oss.jfrog.org (JCenter)

孤人 提交于 2020-01-30 10:15:36

问题


I tried doing a mvn deploy for oss.jfrog.org for my project. However I am getting this error:

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

When I look into the JFrog Repository Browser, I can see that the jar is there withe the correct version, what could be this error, and why is the jar deployed anyway even with this error?

Here's my POM setting:

<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>

Could it be because of the bintray-* id?


回答1:


simple shouldn't be a part of your URL. Artifactory thinks that simple is the name of the repository and oss-snapshot-local is a part of your groupId. Since pom shows a different groupId, it fails with 409.



来源:https://stackoverflow.com/questions/27415722/deploy-snapshot-to-oss-jfrog-org-jcenter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!