Due to issues with a Nexus staging repository, I need to re-run mvn release:perform
, ideally without creating a new Git tag but reusing the one created by the first run.
I tried
mvn release:perform
-DconnectionUrl=scm:git:[email protected]:ops4j/org.ops4j.pax.exam2.git
-Dtag=exam-reactor-3.3.0
and
mvn release:perform
-DconnectionUrl=scm:git:[email protected]:ops4j/org.ops4j.pax.exam2.git
-Dscm.tag=exam-reactor-3.3.0
but in both cases, the clone fails because the tag/branch parameter is not forwarded to Git:
[INFO] --- maven-release-plugin:2.4:perform (default-cli) @ exam-reactor ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd /home/hwellmann/work/org.ops4j.pax.exam2/target && git clone --branch [email protected]:ops4j/org.ops4j.pax.exam2.git /home/hwellmann/work/org.ops4j.pax.exam2/target/checkout
Note: release.properties
and other stuff created by mvn release:prepare
is no longer available.
release:perform will fork a new Maven instance to build the checked-out project. This new Maven instance will use the same system configuration and Maven profiles used by the one running the release:perform goal.
mvn release:prepareThis command prepares for a release in SCM. It goes through several phases to ensure the POM is ready to be released and then creates a tag in SVN which can be used by release:perform to make a release.
Description: Prepare for a release in SCM. Steps through several phases to ensure the POM is ready to be released and then prepares SCM to eventually contain a tagged version of the release and a record in the local copy of the parameters used. This can be followed by a call to release:perform .
The main aim of the maven-release plugin is to provide a standard mechanism to release project artifacts outside the immediate development team. The plugin provides basic functionality to create a release and to update the project's SCM accordingly.
This issue is filed as SCM-729, and currently unresolved. In the meantime, you might consider a workaround.
The simplest is to forget about maven-release-plugin
; clone, check out that tag and then run mvn deploy
.
Alternatively, you can use release:perform
with a manually edited release.properties
file. Set scm.tag
and scm.url
and then run release:perform
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With