0

The goal versions:update-properties produced the following output:

10:52:25,255 INFO  - --- versions-maven-plugin:2.7:update-properties (default-cli) @ release-plugin-test-new-bo ---
10:52:32,605 INFO  - artifact de.continentale.muv:coutil: checking for updates from nexus
10:52:32,666 INFO  - Subincremental version changes allowed
10:52:32,682 INFO  - Updated ${coutil.version} from 7.0.0-SNAPSHOT to 7.0.1-RC0002

I set the parameters -DallowIncrementalUpdates=false, and also -DallowMinorUpdates=false and -DallowMajorUpdates=false, which is reflected in the line "Subincremental version changes allowed". Nevertheless, the version was upgraded by changing the third number in the version.

This behaviour is unexpected and also not idempotent (the next run replaces 7.0.1-RC0002 by 7.0.1).

I tried to figure out why that happens from the documentation and also from the Javadoc and source code but got lost somewhere in Maven version comparison.

Can someone enlighten me? Is this a bug, or do I need to configure things differently to avoid the updates on the third number?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142

1 Answers1

0

Some debugging lead to the conclusion that for 7.0.0-SNAPSHOT, the goal versions:update-properties with the parameters as above does about the following:

  • Create an upper bound by incrementing the third number (in this case, the upper bound is 7.0.1-SNAPSHOT).
  • Look for the largest version below that bound (for Maven 7.0.1-RC0002 is smaller than 7.0.1-SNAPSHOT).

IMHO, the code does not behave properly because there is actually an incremental change in the version number although I set the respective property to false.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142