It has been more than a year since I created this question on GitHub Community; a couple of days after that I found the solution by myself, so I answered my own question, and to this date comments keep being added by people who were helped by my post.
When I look at it today, I notice that my answer has this particular style, this grumpy indignation which has become so characteristic of me, after a lifetime of battling with lame software, and even worse, with lame error messages.
I thought I should share this on my blog for posterity.
Here is the link:
https://github.com/orgs/community/discussions/23474And here is the question:
GitHub Community
Maven deploy fails with status 422 unprocessable entity #23474
Asked by Mikenakis on May 27, 2022
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!
And here is the answer:
Answered by mikenakis on May 29, 2022
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 “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.
No comments:
Post a Comment