1

I'm struggling to push releases to Bintray in full.

From what I can tell, the issue seems to be caused by the maven release plugin trying to push the sources jar twice -- hence the HTTP 409 conflict response being returned.


So far I've not been able to locate the cause. Help would be appreciated!

  • I can see the jars on bintray up to the point that it fails, indicating it doesn't seem to be a credentials issue

  • Appending ;override=1 to the end of the url seemingly allows the release to succeed (I'm still new at this, so not 100% sure what I should be seeing)

  • Another collaborator is able to release fine - he's using a slightly older version of maven (downgrading from 3.6 to 3.5 is my next step, but it seems unusual/odd/unlikely?)

  • mvn test/package/install etc are fine - no concerns there

  • the version number is a full release number, not a snapshot (e.g. 1.2.3, not 1.2.3-SNAPSHOT)

  • edit: similar results are found using both Windows and Ubuntu (virtualbox guest)


Here's a snippet of what I believe to be the relevant parts of the mvn output, but can post more if needed.

[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]
kwah
  • 1,149
  • 1
  • 13
  • 27

1 Answers1

1

Since your pom file isn't attached, I am relying on this example.

The 409 conflict is because you are publishing the same file name to the same path twice.

From the attached logs it looks like you are deploying YYY-core-VERSION-sources.jar twice (it has 2 entries of Installing and Uploading in the log). This means that you are trying to publish a jar with the same name and to the same path. This causes the conflict.

I don't know from the input you gave why you have two identical sources files. One solution, as you have mentioned, is to use the override flag ;override=1 as shown in the Upload API example. I would also take a look why you have 2 files while another collaborator has, probably, only one.

Royg
  • 1,665
  • 1
  • 13
  • 20
  • It looks like I'm coming across the same problem as in [this related question from 2010](https://stackoverflow.com/a/10794985/429733) (my question is arguably a duplicate of that), which links to [this blog post](http://blog.peterlynch.ca/2010/05/maven-how-to-prevent-generate-sources.html) -- in short, it turns out that somewhere along the lines `jar-no-fork` is being added as an execution goal by the maven release plugin. It is only once it reaches Bintray that the duplication is noticed. – kwah Mar 30 '20 at 13:49
  • We'll take a look at why it is different across people but I can replicate across VMs -- locally I'm doing what I understand to be a simple `git clone` of master, and then running the same release clean/prepare/publish. What I do not understand is how this can still be open from 2010 ([candidate for 3.7.0 release](https://issues.apache.org/jira/browse/MNG-5868)) and not seem to be more widespread. – kwah Mar 30 '20 at 13:56
  • Not everybody updates their tools. It might be a version regression. Glad to point to the right direction – Royg Mar 30 '20 at 15:15