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

POM_VERSION is not resetted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • Jenkins 1.581
      Maven 3.0.5

      Hi,

      I'm currently facing an issue with the variable $POM_VERSION.
      I perform the following operations:

      1. Clean Workspace
      2. Checkout from Git (including the pom with Version 1.0.0)
      3. Execute Shell (or execute maven goal, both leads to the same result):
      mvn versions:set DnewVersion=${POM_VERSION}${BUILD_NUMBER};

      Now the POM-Version is set to e.g. 1.0.0-25.

      4. Publish 1.0.0-25 to Nexus

      So everything fine until now. I now Trigger the process the next time, but the variable $POM_VERSION still contains the value "1.0.0-25" from the last run, so the next artifact would be deployed as "1.0.0-25-26" and so on.

      I tried many things line unsetting the variables or copying them into other temp variables but I did not found a solution for this.

      Could you please check if POM_VERSION could be resetted at the beginning?

      Kind regards,

      Tobias

            Unassigned Unassigned
            tobias_schaber tobias schaber
            Votes:
            28 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated: