Skip to content

Commit

Permalink
Fix versions comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
sultan committed Nov 12, 2022
1 parent abfa815 commit 34e13ad
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions content/apt/pom.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,16 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa

* the "<<<alpha>>>", "<<<beta>>>" and "<<<milestone>>>" qualifiers can respectively be shortened to "a", "b" and "m" when directly followed by a number.

* else "<<<.qualifier>>>" \< "<<<-qualifier>>>" \< "<<<-number>>>" \< "<<<.number>>>"
* else "<<<.qualifier>>>" = "<<<-qualifier>>>" \< "<<<-number>>>" \< "<<<.number>>>"

* <<<alpha>>> = <<<a>>> < <<<beta>>> = <<<b>>> < <<<ea>>> < <<<milestone>>> = <<<m>>> < <<<preview>>> < <<<rc>>> = <<<cr>>> < <<<snapshot>>> < '<<<>>>' = <<<final>>> = <<<ga>>> = <<<release>>> \< <<<sp>>>

[]

following semver rules is encouraged, and some qualifiers are discouraged:
* the usage of '<<<CR>>>' qualifier is discouraged, use '<<<RC>>>' instead.
* the usage of '<<<final>>>', '<<<ga>>>', '<<<release>>>' qualifiers is discouraged, use no qualifier instead.
* the usage of '<<<SP>>>' qualifier is discouraged, use version increment instead.

[]

Expand All @@ -527,17 +536,17 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa

* "<<<1-foo2>>>" \< "<<<1-foo10>>>" (correctly automatically "switching" to numeric order)

* "<<<1.foo>>>" \< "<<<1-foo>>>" \< "<<<1-1>>>" \< "<<<1.1>>>"
* "<<<1.foo>>>" = "<<<1-foo>>>" \< "<<<1-1>>>" \< "<<<1.1>>>"

* "<<<1.ga>>>" = "<<<1-ga>>>" = "<<<1-0>>>" = "<<<1.0>>>" = "<<<1>>>" (removing of trailing "null" values)
* "<<<1.ga>>>" = "<<<1-ga>>>" = "<<<1-0>>>" = "<<<1.0>>>" = "<<<1>>>" (removing of trailing "null" values)

* "<<<1-sp>>>" \> "<<<1-ga>>>"
* "<<<1-sp>>>" \> "<<<1-ga>>>"

* "<<<1-sp.1>>>" \> "<<<1-ga.1>>>"
* "<<<1-sp.1>>>" \> "<<<1-ga.1>>>"

* "<<<1-sp-1>>>" \< "<<<1-ga-1>>>" = "<<<1-1>>>" (trailing "null" values at each hyphen)
* "<<<1-sp-1>>>" \> "<<<1-ga-1>>>" = "<<<1-1>>>" (trailing "null" values at each hyphen)

* "<<<1-a1>>>" = "<<<1-alpha-1>>>"
* "<<<1-a1>>>" = "<<<1-alpha-1>>>"

Note: Contrary to what was stated in some design documents, for version order, snapshots are not treated differently than releases or any other qualifier.

Expand Down

0 comments on commit 34e13ad

Please sign in to comment.