Skip to content

Commit fe0ffce

Browse files
Configuring mvn versions plugin
Enabling an explicit exclusion of the xml-apis dependency when checking for updates. As noted in the file, xml-apis rolled backwards in versioning (starting at 2.x and rolling backwards to 1.x). This will prevent the version check from showing any xml-apis 2.x version as newer than our current project configuration, which is the correct behavior based on release dates in maven.
1 parent f32d398 commit fe0ffce

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,14 @@
454454
<artifactId>maven-release-plugin</artifactId>
455455
<version>3.0.0-M4</version>
456456
</plugin>
457+
<plugin>
458+
<groupId>org.codehaus.mojo</groupId>
459+
<artifactId>versions-maven-plugin</artifactId>
460+
<version>2.8.1</version>
461+
<configuration>
462+
<rulesUri>file:\\\\${project.basedir}/versionRuleset.xml</rulesUri>
463+
</configuration>
464+
</plugin>
457465
</plugins>
458466
</pluginManagement>
459467

versionRuleset.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<ruleset comparisonMethod="maven"
2+
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 https://www.mojohaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
4+
<rules>
5+
<!--
6+
xml-apis has a screwy version structure where the 2.x versions are older than the 1.x versions (check the dates in maven!).
7+
we are explicitly ignoring all of the 2.x version lineage of the project.
8+
-->
9+
<rule groupId="xml-apis" artifactId="xml-apis" comparisonMethod="maven">
10+
<ignoreVersions>
11+
<ignoreVersion type="regex">2.*</ignoreVersion>
12+
</ignoreVersions>
13+
</rule>
14+
</rules>
15+
</ruleset>

0 commit comments

Comments
 (0)