Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7714

sp < final

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-7
    • None
    • None

    Description

      Ported from a comment on https://issues.apache.org/jira/browse/MNG-7701

      The claim is that sp < final, which if true is incorrect according to spec.

      It is easy to demonstrate that this is not fixed and also not in line with the spec, with just this one important example (yes this does break for us):

      $ jbang org.apache.maven:maven-artifact:3.8.6 1.0.final-redhat-0001 1.0.sp1-redhat-0001
      Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
      1. 1.0.final-redhat-0001 -> 1-redhat-1; tokens: [1, [redhat, [1]]]
      1.0.final-redhat-0001 < 1.0.sp1-redhat-0001
      2. 1.0.sp1-redhat-0001 -> 1.0.sp-1-redhat-1; tokens: [1, 0, sp, [1, [redhat, [1]]]]

      versus

      $ jbang org.apache.maven:maven-artifact:3.8.7 1.0.final-redhat-0001 1.0.sp1-redhat-0001
      Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
      1. 1.0.final-redhat-0001 -> 1-redhat-1; tokens: [1, [redhat, [1]]]
      1.0.final-redhat-0001 > 1.0.sp1-redhat-0001
      2. 1.0.sp1-redhat-0001 -> 1-sp-1-redhat-1; tokens: [1, [sp, [1, [redhat, [1]]]]]

      As you can see, our `sp` release is now ordered after our `final` release despite this clear text in the "spec":

      Non-numeric tokens ("qualifiers") have the alphabetical order, except for the following tokens which come first in this order: "alpha" < "beta" < "milestone" < "rc" = "cr" < "snapshot" < "" = "final" = "ga" < "sp"

      It's clear that this tokenization isn't really correct by any reasonable measurement, and breaking large amounts of (our) existing artifacts in the wild is definitely not OK.

      Attachments

        Activity

          People

            elharo Elliotte Rusty Harold
            elharo Elliotte Rusty Harold
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: