I have included the Maven Versions Plugin into my multi-module project.
I have also declared some rules in rules.xml
in a dedicated folder in the root level of my project.
When I run mvn versions:update-properties -pl :foobar -DrulesUri=file:///${project.rootdir}/plugins/maven-versions-plugin/rules.xml
, then it appears that the rules are not taken into account.
Here is the rule set:
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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">.*[-_\.](alpha|Alpha|ALPHA|b|beta|Beta|BETA|rc|RC|M|EA)[-_\.]?[0-9]*</ignoreVersion>
</ignoreVersions>
<rules>
</rules>
</ruleset>
I can see that one dependency is, for instance, updated to version 1.0.0-alpha-3
which should be forbidden by the rule.
So my first problem is that I do not know whether the plugin actually considers the rule set. Running the same command with -X
did not provide any information on this.
Any ideas?