# Version Management
This document is about versioning Sermant.
Sermant directly use versions-maven-plugin (opens new window) do version management , commonly used commands are as follows:
- The updated version number is
${version}
:By default, this command keeps the originalmvn versions:set -DnewVersion=${version}
pom
file backup. - Rollback version number:
mvn versions:revert
- Commit the new version update, i.e. delete the original
pom
file backup:mvn versions:commit
- Update version to
${version}
and commit:This command will not back up the originalmvn versions:set -DnewVersion=${version} -DgenerateBackupPoms=false
pom
file, be careful not to write the version number wrong when using it.
In the above update command, only the modules that have the same version as the top-level module in the project will be modified. If you need to update a module separately, you can use the -pl
flag, for example:
mvn versions:set -DnewVersion=${version} -DgenerateBackupPoms=false -pl ${module}
Where ${module}
can pass ${groupId}:${artifactId}
, can also pass relative path. In the case of multiple modules, use the ','
sign.
More information about the versions:set
command can be found here Versions Maven Plugin versions:set (opens new window)。
More versions-maven-plugin
commands can be found in Versions Maven Plugin Introduction (opens new window)。