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

Performing a Maven release with Hudson Mercurial Plugin fails when trying to push to remote repository

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • m2release-plugin
    • None
    • Windows 7

      I'm trying to perform a Maven release on my project with Hudson Mercurial Plugin. I have a local Mercurial repository and I'm pushing my changes to a remote repository for Hudson to poll them.

      My hudson job configuration looks as follows:

      Mercurial Repository URL: http://repo (path to the remote repository)
      Mercurial Repository Browser: hgweb
      Maven release build release goals and options: -Dresume=false release:prepare release:perform

      For reference I have the following in my pom.xml:
      <scm>
      <connection>scm:hg:http://repo</connection>
      <developerConnection>scm:hg:http://repo</developerConnection>
      </scm>

      All regular (i.e. non-release builds) are performing succesfully. Hudson detects changes in the remote repository and performs "hg update". When I perform a Maven Release using the Hudson Maven Release Plug-In Plug-In, it's executing "hg status", "hg commit" and "hg push http://repo". The last command fails with the following message:

      [INFO] EXECUTING: cmd.exe /X /C "hg push http://repo"
      [ERROR]
      EXECUTION FAILED
      Execution of cmd : push failed with exit code: 1.
      Working directory was:
      C:\hudson\jobs\MyProject\workspace
      Your Hg installation seems to be valid and complete.
      Hg version: 1.5.1 (OK)

      I found out that I can workaround this problem by creating an additional remote repository on the same server and point the SCM connection strings in my pom.xml to that new repository. When I do it like that it runs without error. Only thing is, I don't want to have two remote repositories for each project and I want my SNAPSHOT version to be automatically updated (like I have with SVN).

          [JENKINS-6426] Performing a Maven release with Hudson Mercurial Plugin fails when trying to push to remote repository

            Unassigned Unassigned
            jeroen_rosenberg jeroen_rosenberg
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: