Adding MVN Artifacts with classifiers

We are looking to migrate to GitHub also for our Packages but notice the functionality differs from what we’re used to. Specifically there seems to be an issue with artifacts that have classifiers that won’t deploy. Does anybody know what to do to enable this?

Error: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file (deploy-facilities-rpms) on project …: Error deploying attached artifact /__w/…-NEXT-SNAPSHOT-classes.jar: Failed to deploy artifacts: Could not transfer artifact …:jar:classes:NEXT-20200924.111645-2 from/to github-snapshots (…): Failed to transfer file:…-classes.jar. Return code is: 409, ReasonPhrase: Conflict. -> [Help 1]

A fix for SNAPSHOT versions that have dependencies on a classifier was deployed last night. I wonder if this was the issue you were seeing?

Hi @jcansdale, the issue indeed appears to be fixed, thank you!

@jcansdale Sorry for hijacking this thread but we are also just recently started seeing issues with our MVN packages which worked before. Both SNAPSHOT and sources have been known to cause issues in the past with GitHub Packages so I suspect this is related:

Error: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project […]: Failed to deploy artifacts: Could not transfer artifact […]:jar:2.13.0 from/to github ([…]): Transfer failed for[…]-2.13.0.jar 422 Unprocessable Entity -> [Help 1]

Hi @fabian,

Unfortunately Maven and Gradle don’t surface the human readable error message that is sent along with the 422 error code. So see the error message, you can do the following:

mvn deploy

Your log will be very long, but with any luck there will be something helpful near the end of it. You might need to download the log and open it locally (if it’s too long for the website to handle).

Please let me know how you get on!

1 Like

Thanks for your reply!

Changing the artifactId to lowercase as explained in other threads helped with the 422 error. But now SNAPSHOT with sources seems to be broken again, with error 400 Bad Request:

error retrieving metadata for snapshot file: […]-3.0.2-20201019.121625-1.jar

Could this be because the repository name still has a mixed case name and is part of the repository URL?