Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-812

"prepare" does not commit before tagging and therefore deploys snapshot instead of release

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 2.4
    • Fix Version/s: 2.5
    • Component/s: Git
    • Labels:
      None
    • Number of attachments :
      2

      Description

      thank you very much for new release!
      http://mail-archives.apache.org/mod_mbox/maven-announce/201212.mbox/%3Cop.wpjbptp1kdkhrr@columbia%3E

      it seems we need an emergency fix:

      attached are 2 logs:
      1) mvn-2.3.2.txt invocation that works fine with 2.3.2
      2) mvn-2.4.0.txt invocation that fails with 2.4

      problem:

      "perform" does not commit tags, deploys snapshot instead of release

      here is project parent:
      http://search.maven.org/remotecontent?filepath=com/barchart/base/barchart-archon/2.3.6/barchart-archon-2.3.6.pom

      build is invoked both times with this:

      mvn --define resume=false release:prepare
      mvn --define resume=false release:perform

      1. mvn-2.3.2.txt
        25 kB
        Andrei Pozolotin
      2. mvn-2.4.0.txt
        27 kB
        Andrei Pozolotin

        Issue Links

          Activity

          Hide
          AF KL Customer added a comment -

          We have exactly the same problem with maven-release-plugin 2.5 (but only with projects which don't have a pom at the root of git repository) . For projects with a pom at the root , it works fine !

          Show
          AF KL Customer added a comment - We have exactly the same problem with maven-release-plugin 2.5 (but only with projects which don't have a pom at the root of git repository) . For projects with a pom at the root , it works fine !
          Hide
          Martin Ellis added a comment -

          Looks like we're seeing MRELEASE-875.
          I've added my vote there.

          Show
          Martin Ellis added a comment - Looks like we're seeing MRELEASE-875 . I've added my vote there.
          Hide
          Torben Knerr added a comment -

          Interestingly, I'm seeing this with maven-3.0.5 / maven-release-plugin 2.4.2 on our build server (ubuntu) but not on my local windows machine (windows).

          I had run exactly the same commands (mvn release:clean release:prepare -B -X -DreleaseVersion=1.0-alpha-1 -DupdateWorkingCopyVersions=false) on both my windows workstation and on our ubuntu buildserver.

          They produced exactly the same output, same plugin dependencies (run with -X flag), but on the buildserver the commit / push of the modified pom was missing.

          I have no clue why this behaves differently on my windows workstation vs. buildserver.

          Pinning maven-release-plugin to 2.5 in pluginManagement solved the problem for me.

          Show
          Torben Knerr added a comment - Interestingly, I'm seeing this with maven-3.0.5 / maven-release-plugin 2.4.2 on our build server (ubuntu) but not on my local windows machine (windows). I had run exactly the same commands ( mvn release:clean release:prepare -B -X -DreleaseVersion=1.0-alpha-1 -DupdateWorkingCopyVersions=false ) on both my windows workstation and on our ubuntu buildserver. They produced exactly the same output, same plugin dependencies (run with -X flag), but on the buildserver the commit / push of the modified pom was missing. I have no clue why this behaves differently on my windows workstation vs. buildserver. Pinning maven-release-plugin to 2.5 in pluginManagement solved the problem for me.
          Hide
          Torben Knerr added a comment -

          Re: 2.5 solved the problem only for projects with top-level pom files, run into MRELEASE-875 as well :-/

          I tried switching back to 2.4.2 or 2.3.2 but none of the suggested approaches worked for me (neither with LANG=en_US.UTF8 nor with the git-exe 1.9 plugin dependency)

          Show
          Torben Knerr added a comment - Re: 2.5 solved the problem only for projects with top-level pom files, run into MRELEASE-875 as well :-/ I tried switching back to 2.4.2 or 2.3.2 but none of the suggested approaches worked for me (neither with LANG=en_US.UTF8 nor with the git-exe 1.9 plugin dependency)
          Hide
          Koen Serneels added a comment - - edited

          I was experiencing the same issue (Git 1.9.1/Ubuntu). The release plugin (was using 2.4.2) would not commit anymore, resulting in the SNAPSHOT suffix being present in the tag.
          Bumping the release plugin to 2.5 solved the problem for projects having the pom.xml in the repository root.
          However, I had another project with the pom.xml NOT directly in the repository root. For this bumping to 2.5 alone was not enough. To fix this the SCM api and gitexe dependency also need to be overridden to the latest version (1.9.1 atm). This solved the problem there as well with the release plugin still at v2.5

          <dependencies>
          	<dependency>
                      <groupId>org.apache.maven.scm</groupId>
                      <artifactId>maven-scm-api</artifactId>
                      <version>1.9.1</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.maven.scm</groupId>
                      <artifactId>maven-scm-provider-gitexe</artifactId>
                      <version>1.9.1</version>
                  </dependency>
          </dependencies>
          

          See also https://jira.codehaus.org/browse/SCM-740

          Show
          Koen Serneels added a comment - - edited I was experiencing the same issue (Git 1.9.1/Ubuntu). The release plugin (was using 2.4.2) would not commit anymore, resulting in the SNAPSHOT suffix being present in the tag. Bumping the release plugin to 2.5 solved the problem for projects having the pom.xml in the repository root. However, I had another project with the pom.xml NOT directly in the repository root. For this bumping to 2.5 alone was not enough. To fix this the SCM api and gitexe dependency also need to be overridden to the latest version (1.9.1 atm). This solved the problem there as well with the release plugin still at v2.5 <dependencies> <dependency> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-api</artifactId> <version>1.9.1</version> </dependency> <dependency> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-provider-gitexe</artifactId> <version>1.9.1</version> </dependency> </dependencies> See also https://jira.codehaus.org/browse/SCM-740

            People

            • Assignee:
              Robert Scholte
              Reporter:
              Andrei Pozolotin
            • Votes:
              13 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: