Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7998

Support for leading zero for calculating the next version number

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • m2release-plugin
    • None
    • m2release 0.6.1

      If you have a versionnumber with leading zero (to fill a constant string length) the method M2ReleaseAction.computeNextVersion() strip this zeros from the version string for the next version.

      I have wrote a patch for that.

      Have a look at https://github.com/kreyssel/hudson-plugins/commit/7572cc1a51c16b4c81adc978ad0ebe315addf73c

      It would be nice if you can include this in the official release version.

      Thanks.

          [JENKINS-7998] Support for leading zero for calculating the next version number

          James Nord added a comment -

          Thanjs for the patch and testcase, however I have a concern about this,

          That is these versions (starting with leading zero are not valid maven versions.

          That is 1.002.1 is not majer=1 minor=2 patch=1 buildnum=null qualifier=null
          but major=0 minor=0, patch=0 buildnum=0 qualifier="1.002.1"

          see http://svn.apache.org/viewvc/maven/maven-2/tags/maven-2.2.1/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java?view=markup

          James Nord added a comment - Thanjs for the patch and testcase, however I have a concern about this, That is these versions (starting with leading zero are not valid maven versions. That is 1.002.1 is not majer=1 minor=2 patch=1 buildnum=null qualifier=null but major=0 minor=0, patch=0 buildnum=0 qualifier="1.002.1" see http://svn.apache.org/viewvc/maven/maven-2/tags/maven-2.2.1/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java?view=markup

          James Nord added a comment -

          comment from hudson jira missed in migration

          azgard added a comment - 31/Jan/11 07:36 AM
          I close this issue.

          You totaly right, maven does not support version other than the simple format.

          Look at http://sonatype.com/books/maven-book/reference/pom-relationships-sect-pom-syntax.html

          Thanks.

          James Nord added a comment - comment from hudson jira missed in migration azgard added a comment - 31/Jan/11 07:36 AM I close this issue. You totaly right, maven does not support version other than the simple format. Look at http://sonatype.com/books/maven-book/reference/pom-relationships-sect-pom-syntax.html Thanks.

            Unassigned Unassigned
            azgard azgard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: