We have a multi module project for which we want to do a release using the following command
mvn release:prepare release:perform -B -e -X
which fails with
07:54:12 [INFO] Caused by: org.eclipse.aether.transfer.ArtifactTransferException:
Could not transfer artifact ch.test.sub:my-app:pom:2019.02.07 from/to
release-repo (https://nexus.intra/content/repositories/releases/):
Failed to transfer file:
https://nexus.intra/content/repositories/releases/ch/test/sub/my-app/2019.02.07/my-app-2019.02.07.pom.
The return code is 400, ReasonPhrase: Repository does not allow updating assets: releases.
The message is pretty clear but there are some things which do not add up
- When initiating maven the
my-app-2019.02.07.pom
is not in nexus I examined the log and there is only one "Uploading to release-repo" happening which is when the build process fails with the message above
07:54:11 [INFO] [INFO] Uploading to release-repo: https://nexus.intra/content/repositories/releases/ch/test/sub/my- app/2019.02.07/my-app-2019.02.07.pom
At this point, I can observe that there is a
my-app-2019.02.07.pom
in the Nexus repository
How does it get there when - according to the log - there was no upload happening?
pom.xml
before maven is initiated
...
<parent>
<groupId>ch.test</groupId>
<artifactId>my.app</artifactId>
<version>2019.02.07-SNAPSHOT</version>
<relativePath>../pom-parent</relativePath>
</parent>
...
Version Info
- Apache Maven 3.5.4
- Java version: 1.8.0_201
- OS name: "windows server 2016", version: "10.0", arch: "amd64", family: "windows"