versions: [Bug] The command line 'mvn versions:set' returns exit code 1 with the last maven version 3.8.2
Hi,
I have a shell script who runs the command line ‘mvn versions:set’ and verify the exit code. With my previous Maven 3.6.3, everything works fine. But I recently upgraded maven to 3.8.2, and now the command line ‘mvn versions:set’ returns exit code 1 systematically. I precise that the result of the mvn command is BUILD SUCCESS of course.
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$mvn_new_version
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "ERROR : cmd mvn versions:set -DnewVersion=$mvn_new_version failed"
exit 10
fi
Any idea ?
Kind regards, Romain
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 28 (18 by maintainers)
This issue has been fixed since r2.9.0 by https://github.com/mojohaus/versions-maven-plugin/pull/488.
To assert that, execute the following commands:
path/to/maven/3.8.2+/bin/mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:set -DnewVersion=XYZ; echo $?
returns 1path/to/maven/3.8.2+/bin/mvn org.codehaus.mojo:versions-maven-plugin:2.9.0:set -DnewVersion=XYZ; echo $?
returns 0IMO, this issue could be closed.