I have the same problem and got the mileage from the following solution. The Maven Non-Interactive releases at the bottom of the page describe how to use the release.properties file for versioning.
Instead of manually cranking this file, I first ran maven locally using:
mvn -U release:prepare -DdryRun=true -Dresume=false
Answering all the questions, he creates the release.properties file that you would like to use. The only thing to do is edit the release.properties file.
At the end of the file is:
completedPhase=end-release
change this to:
completedPhase=check-dependency-snapshots
see Phases of the Maven Release plugin This will lead to a short circuit of the scm-check changes, but you are on the build server, so there should be no local changes.
I checked this file in our scm in the root of the project (at the same level as pom)
In jenkins, I have the following settings for release:
--batch-mode release:prepare release:perform
It seems a little messy to me. I hope there is a cleaner way. [Running: Jenkins 1.533, Jenkins Maven Release Plug-in Plug-in 0.12.0, Maven Integration plugin 1.533]
source share