Bintray 409冲突-MVN发行插件上载jar两次?

我正在努力将发布内容完全推送到Bintray。

据我所知,问题似乎是由Maven版本插件试图将源jar两次推送所致,因此返回了HTTP 409冲突响应。


到目前为止,我无法找到原因。帮助将不胜感激!

  • 我可以看到Bintray上的罐子直到出现故障为止,表明这似乎不是凭证问题

  • 在网址末尾附加;override=1似乎可以使发行成功(我仍然是新手,所以不能100%确定我应该看到的内容)

  • 另一位协作者可以放心-他使用的是较老版本的maven(下一步是从3.6降到3.5,但这似乎很不正常/奇怪/不太可能吗?)

  • mvn测试/打包/安装等都很好-不用担心

  • 版本号是完整的发行版号,而不是快照(例如1.2.3,而不是1.2.3-snAPSHOT)

  • 编辑:使用Windows和Ubuntu(virtualbox guest虚拟机)都可以找到类似的结果


以下是我认为是mvn输出的相关部分的摘要,但可以在需要时发布更多内容。

[INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ YYY-core ---
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/pom.xml to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-javadoc.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO] 
[INFO] [INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) @ YYY-core ---
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar (1.2 MB at 112 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom (4.9 kB at 824 B/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar (781 kB at 96 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar (3.8 MB at 218 kB/s)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary for YYY-parent VERSION:
[INFO] [INFO] 
[INFO] [INFO] YYY-parent ...................... SUCCESS [ 18.058 s]
[INFO] [INFO] YYY-core ........................ FAILURE [01:37 min]
[INFO] [INFO] YYY-core-testing ................ SKIPPED
[INFO] [INFO] YYY-B-core ...................... SKIPPED
[INFO] [INFO] YYY-B-testing ................... SKIPPED
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time:  01:56 min
[INFO] [INFO] Finished at: 2020-03-28T03:33:28Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project YYY-core: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.github.YYY:YYY-core:jar:sources:VERSION from/to bintray-YYY-ZZZ (https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1): Failed to transfer file: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar. Return code is: 409,ReasonPhrase: Conflict. -> [Help 1]
zhangwei805 回答:Bintray 409冲突-MVN发行插件上载jar两次?

由于未附加您的pom文件,因此我依赖此example

409 conflict是因为您将同一文件名发布到同一路径两次。

从随附的日志中看来,您两次部署YYY-core-VERSION-sources.jar(日志中有2个条目 Installing Uploading )。这意味着您正在尝试publish具有相同名称和相同路径的jar。这会引起冲突。

从您提供的输入中我不知道为什么会有两个相同的sources文件。如您所提到的,一种解决方案是使用覆盖标志;override=1,如Upload API示例所示。我还要看看为什么您有2个文件,而另一个协作者可能只有1个文件。

本文链接:https://www.f2er.com/2564279.html

大家都在问