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

POM_VERSION incorrect when using multiple-scms-plugin

    Details

    • Similar Issues:

      Description

      I was using the single git repo, and setting the build name using:

       ${ENV,var="POM_VERSION"}
      

      This was giving me the correct version string gy the versions:set target:
      naven goals:

      -DBUILD_NUMBER=${SHORT_BRANCH}-${BUILD_NUMBER} clean versions:set
      

      ie:

      3.48.0-develop-87
      

      After switching over to the multiple-scms-plugin and adding a second git repo for a gradle project, the build name was now:

      3.48.0-SNAPSHOT
      

      even though there was still only a single maven project.
      It had moved down into a subdirectory as I needed to do so in order to pull in another git repo, each in their own dir, but no changes to the maven build other than that.

      There were no new maven targets added. AFAICT it's related to the addition of the second git repo or the switch from a single repo to the multipls-scms-pluin.

      I added a shell exec immediately after the maven versions:set:

      echo post versions:set POM_VERSION=3.48.0-SNAPSHOT
      

      which logs:

      post versions:set POM_VERSION=3.48.0-SNAPSHOT
      

        Attachments

          Activity

          Hide
          bedge Bruce Edge added a comment -

          My fault, was missing a folder specifier to the pom in the versions:set target.

          Show
          bedge Bruce Edge added a comment - My fault, was missing a folder specifier to the pom in the versions:set target.

            People

            • Assignee:
              olamy Olivier Lamy
              Reporter:
              bedge Bruce Edge
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: