mojohaus / clirr-maven-plugin

Clirr Maven Plugin
https://www.mojohaus.org/clirr-maven-plugin/
Apache License 2.0
11 stars 15 forks source link

Ignore same version in comparison range #25

Open fjakop opened 4 years ago

fjakop commented 4 years ago

We'd like to compare our artifacts always to the API baseline of the lowest major version in the version range, i.e. all 1.x.y versions are to compare with 1.0.0 (if it exists). We'd like to make sure that there's no breaking change in artifacts with the same major number.

Our configuration is like this

<comparisonVersion>[${parsedVersion.majorVersion},${project.version}]</comparisonVersion>

where parsedVersion.majorVersion comes from build-helper-maven-plugin and is the current major number of the reactor build.

This works fine except for the initial major build (i.e. 1.0.0, 2.0.0). If we try to build that version numbers we get

Invalid comparison version: Range defies version ordering: [1,1.0.0-SNAPSHOT]

which is basically correct because the SNAPSHOT is considered "previous" to the version.

Is there an option to ignore these constellations so that we are able to "set the baseline" with x.0.0 builds?