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

Small change to artifact version parsing.

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.9
    • 3.2.1
    • General
    • None

    Description

      We currently many projects that use an OSGi compatible scheme for release version numbers. The OSGi spec does not currently allow a "-" to determine the location of the qualifier. So instead of the maven standard like this:

      1.0.1-beta-1

      We have something like this:

      1.0.1.beta1

      Maven's currently handles this by treating the entire version string as a classifier. It would be helpful this could be parsed as
      major = 1
      minor = 0
      incremental = 1
      qualifier = beta1

      Attachments

        Issue Links

          Activity

            pgier Paul Gier added a comment -

            Attaching a patch with the change to the DefaultArtifactVersion, and updates to the unit tests.

            pgier Paul Gier added a comment - Attaching a patch with the change to the DefaultArtifactVersion, and updates to the unit tests.

            Other related issue.

            siveton Siveton Vincent added a comment - Other related issue.
            hboutemy Herve Boutemy added a comment - see http://docs.codehaus.org/display/MAVEN/Versioning
            hboutemy Herve Boutemy added a comment -

            the idea seems interesting, but this change breaks toString() result:

            new DefaultArtifactVersion( "1.0.1.beta1" ).toString() -> "1.0.1-beta1"
            hboutemy Herve Boutemy added a comment - the idea seems interesting, but this change breaks toString() result: new DefaultArtifactVersion( "1.0.1.beta1" ).toString() -> "1.0.1-beta1"

            Should be possible to fix toString() by just using comparable.toString() instead of trying to reconstruct the string from the parsed bits.

            bentmann Benjamin Bentmann added a comment - Should be possible to fix toString() by just using comparable.toString() instead of trying to reconstruct the string from the parsed bits.

            People

              stephenconnolly stephenconnolly
              pgier Paul Gier
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: