Maven Release Plugin - Skip update release snapshot version: prepare step

I am using the maven release plugin for release management. I am running mvn release: get ready for the release. The result of this is that I have a git tag with released versions and a released branch with the next version of SNAPSHOT for development.

Now I want to change this process so that the release always releases the version (There is no incursion of the SNAPSHOT version).

The reason for this is that during build assembly I want the tag release and release to have the same HEAD commit.

This can be achieved if I can skip the last step of rolling the version without re-creating or deleting the existing branch.

Is there a way to configure the mvn release plugin?

Ref - http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html

+4
source share
1 answer

You can try the option: updateWorkingCopyVersionsas indicated in the manual

Will delete working copy versions before developmentVersion. The default value is true. User Property: updateWorkingCopyVersions.

So you can run:

mvn release:prepare -DupdateWorkingCopyVersions=false
0
source

All Articles