Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] version numbers and release qualifiers

On Tue, 21 Jan 2020 at 18:42, Werner Keil <werner.keil@xxxxxxx> wrote:
> Aside from the thread here this post by Oracle (Maybe Bill was involved ?;-) also outlines the versioning rather well:

It's very, very inaccurate (or outdated).

For example, on that page they say:

> All versions with a qualifier are older than the same version without a qualifier (release version).
> For example:
> 1.2-beta-2 is older than 1.2.

which, as specified in already linked [VOS]
(this _is_ source of truth in that case), and in code linked by BJ
Hargrave just above (implementation/effective source of truth), is
only true for "alpha" < "beta" < "milestone" < "rc" = "cr" <
"snapshot". With "" (empty), "final" and "ga" making version the same
age, and all other qualifiers making version younger/newer than 1.2
(with the exception for "sp" that comes just after "").

Or next para from MAVEN400:

> For example, Maven arranges the version list in the following manner:
> Version should come before and, but the unexpected fourth field (.3) forced Maven to evaluate the version as a string.

Maybe it was true in time of writing that article, but it is not true now:
$ java -jar maven-artifact-3.6.3.jar
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. == <
2. ==

because [VOS]:
"The Maven coordinate is split in tokens between dots ('.'), hyphens
('-') and transitions between digits and characters"
"This gives a sequence of version numbers (numeric tokens) and version
qualifiers (non-numeric tokens)"

> Brings me back to the only unanswered question about the qualifier itself.
> "basic string comparison" for the qualifier sounds like
> 1.2-beta-02 is NOT newer than 1.2-beta-1.
> I could also run it
> but if someone has a quick answer

It IS newer.


Back to the top