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

Maven release plugin with version 2.3.2 does not attempt to push to Mercurial

XMLWordPrintable

      My Mercurial repository is set up like this:

      (root)

      • settings.xml
      • appGroup1
        • agModule1
          • pom.xml
        • agModule2
          • pom.xml
        • pom.xml
      • appGroup2
        • (etc)

      The "agModule1" pom.xml and "agModule2" pom.xml are used to build each application (module), individually. The "appGroup1" pom.xml is a shared configuration that specifies settings for release builds.

      I'm trying to set up a build for the "appGroup1" (release build config) pom.xml. It builds fine for snapshot versions, and it builds fine for a dry run release build, but doing a full release build fails.

      Using the default version of the maven release plugin in my pom.xml, it fails when attempting to execute goal "deploy". I believe this is because it looks for a "pom.xml" in the root directory, when it's actually located in "appGroup1\pom.xml".

      Using a newer version of the maven release plugin in my pom.xml (2.3.2), which apparently fixes the above issue, fails when it tries to check out the check out the code to perform the release. I believe this is because it tries to check out the release tag that it's just created, but it never pushes the tag to the remote repository, so the clone fails.

      There are two issues at stake here:
      1) The default version of the maven release plugin apparently doesn't like having a pom.xml in a sub-directory.
      2) Specifying a newer version of the maven release plugin (e.g. 2.2.1 or 2.3.2) does not attempt to push tags and pom.xml updates to the main Mercurial repository.

      Please see attached pom.xml and error messages.

      The Jenkins job was set up as a Maven 2/3 job. The pertinent settings are:

      • Build
        • MAVEN 3.0.4
        • Root POM: appGroup1/pom.xml
        • Alternate settings file: settings.xml
      • Build Environment
        • Maven release build
          • Release goals and options: -s settings.xml -Dresume=false release:prepare release:perform
          • DryRun goals and options: -s settings.xml -Dresume=false -DdryRun=true release:prepare

            ldmyers Laurence Myers
            ldmyers Laurence Myers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: