When I execute mvn release:perform
on a parent POM, the server is responding with this error about one of the child projects (filenames redacted):
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project: Failed to deploy artifacts: Could not transfer artifact from/to repository: Failed to transfer file. Return code is: 400, ReasonPhrase: Bad Request.
However, all the files for this child project are successfully uploaded! I see a new directory (named after the release version number) and it contains all the .jar, .pom, .md5, and .sha1 files one would expect.
I don't have access to the Nexus server, but I'm wondering what might cause this and how to fix it. Is it possible that Maven is trying to upload this particular child project twice? If so, why would Maven be doing this and how can I stop it?
UPDATE: If you're having the same problem, check out the answer with the most upvotes in this post. I ran mvn help:effective-pom
and found that the project in question actually had two executions of the deploy phase. Removing one of those executions solved my problem.