Hi all,
I'm quite new to Maven and Maven plugins, but have recently been quite active. Today, a bug report was raised to versions-maven-plugin, where a user claims that the plugin's logic doesn't correspond Maven versioning policy. And the user might be right.
Apparently, non-standard qualifiers aren't being considered as less mature than releases without any qualifiers, which as far as I know, conflicts with the version policy, which states that any qualified version should be deemed less mature.
Case in question: version 2.3-pfd is consider an update to 2.3.
Responsible class: ComparableVersion, which is being used by all version comparators in the plugin, but the class has also been imported to maven proper, and apparently is being used there too for comparing versions. I've checked. Made a small unit test using the Maven class which confirms my suspicion.
ComparableVersion actually contains a bespoke list of qualifiers which it considers as making the version *older* than the release, but there are also some which make the version newer (?):
/**
* A comparable for the empty-string qualifier. This one is used to determine if a given qualifier makes the
* version older than one without a qualifier, or more recent.
*/
private static final Comparable<String> RELEASE_VERSION_INDEX = String.valueOf( QUALIFIERS_LIST.indexOf( "" ) );
My question is then: is this really a bug or is it a feature of the versioning system?
Best regards
Andrzej