Maven deploy fails with status 422 unprocessable entity #23474
-
I have this repository: GitHub - mikenakis/Bathyscaphe: Deep immutability and thread-safety assessment for Java objects in which both my CI-Workflow and my Release-Workflow work fine. Now I am trying to extract a sub-module from that repository into a new repository. So, I created this repository: GitHub - mikenakis/BathyscapheClaims The CI-Workflow works, but when I try to launch the Relase-Workflow, I get the following error: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M2:deploy (default-deploy) on project bathyscaphe-claims: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact io.github.mikenakis:bathyscaphe-claims:jar:1.3 from/to github (https://maven.pkg.github.com/mikenakis/BathyscapheClaims): transfer failed for https://maven.pkg.github.com/mikenakis/BathyscapheClaims/io/github/mikenakis/bathyscaphe-claims/1.3/bathyscaphe-claims-1.3.jar, status: 422 Unprocessable Entity → [Help 1] I have already seen the issues that appear to be similar; most of them have no answer, one of them (Maven deploy fails with HTTP 422 Unprocessable Entity) has an extensive discussion, but it does not seem to apply in my case. Can someone please help me? It is probably something silly, but I only have one pair of eyes, while this obviously needs two! (-:= Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
I figured this one out too by myself. What happened is that GitHub apparently has some monstrous bug which causes artifact deployment to fail if some other repository (only by the same owner, I hope!) has already deployed an artifact with the exact same name. In this case, one repository was called Bathyscaphe, the other was called BathyscapheClaims, but each repository was trying to deploy an artifact called bathyscaphe-claims. I changed the name of the artifact in the second repository from bathyscaphe-claims to bathyscaphe-claims2 and it worked. The situation was certainly made worse by this contemptible monstrosity that goes by the name of “maven”, which never gives any meaningful error message whatsoever when the slightest thing goes wrong. I mean, “unprocessable entity”? Really? It must have been some very special kind of idiot who came up with this error message. |
Beta Was this translation helpful? Give feedback.
-
I faced the same problem and haven't found a solution yet. |
Beta Was this translation helpful? Give feedback.
-
Confirm, in our case it was just the file path validation error: it should be lowercase to be able to push to github packages. |
Beta Was this translation helpful? Give feedback.
I figured this one out too by myself.
(Hey community, you are not helping much!)
What happened is that GitHub apparently has some monstrous bug which causes artifact deployment to fail if some other repository (only by the same owner, I hope!) has already deployed an artifact with the exact same name.
In this case, one repository was called Bathyscaphe, the other was called BathyscapheClaims, but each repository was trying to deploy an artifact called bathyscaphe-claims.
I changed the name of the artifact in the second repository from bathyscaphe-claims to bathyscaphe-claims2 and it worked.
The situation was certainly made worse by this contemptible monstrosity that goes by the name of “m…