Update all version, including parent and versions in properties:
mvn versions:update-parent versions:use-latest-versions versions:update-properties
If you don't want to update to release milestones, you can add a filter.
This filter has to be uploaded to any url, maven cannot read a filter file from the filesystem.
Upload the following maven-version-rules.xml
to somewhere. I uploaded my personal filter to https://static.gmasil.de/maven-version-rules.xml.
<ruleset comparisonMethod="maven" xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
<ignoreVersions>
<ignoreVersion type="regex">.*-M\d+</ignoreVersion>
</ignoreVersions>
</ruleset>
This filter rule will ignore all versions ending with -M1
, -M2
and so on, effectively excluding release milestones.
With the following command you can update all dependencies with the filter applied. Make sure to change the filter XML URL accordingly:
mvn versions:update-parent versions:use-latest-versions versions:update-properties \
-Dmaven.version.rules=https://static.gmasil.de/maven-version-rules.xml