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
          John Casey added a comment - - edited

          I've seen this happening in version 2.3.2 also.

          I'm just adding this to help others searching for solutions to this. It's a VERY difficult problem to understand until you sift through the debug console output...and even then, you have to know what to look for.

          If you're using Maven 3.1.1, this behavior will crop up if you don't have a version specified for the release plugin in your pom.xml, since it seems to be the default version.

          From an execution using Maven 3.1.1 and release 2.3.2:

          [DEBUG] On branch master
          [DEBUG] Your branch is up-to-date with 'origin/master'.
          [DEBUG] 
          [DEBUG] Changes to be committed:
          [DEBUG]   (use "git reset HEAD <file>..." to unstage)
          [DEBUG] 
          [DEBUG] 	modified:   pom.xml
          [DEBUG] 
          [DEBUG] Untracked files:
          [DEBUG]   (use "git add <file>..." to include in what will be committed)
          [DEBUG] 
          [DEBUG] 	pom.xml.releaseBackup
          [DEBUG] 	prepare.log
          [DEBUG] 	release.properties
          [DEBUG] 
          [INFO] Tagging release with the label buildmetadata-maven-plugin-1.3.1...
          
          Show
          John Casey added a comment - - edited I've seen this happening in version 2.3.2 also. I'm just adding this to help others searching for solutions to this. It's a VERY difficult problem to understand until you sift through the debug console output...and even then, you have to know what to look for. If you're using Maven 3.1.1, this behavior will crop up if you don't have a version specified for the release plugin in your pom.xml, since it seems to be the default version. From an execution using Maven 3.1.1 and release 2.3.2: [DEBUG] On branch master [DEBUG] Your branch is up-to-date with 'origin/master'. [DEBUG] [DEBUG] Changes to be committed: [DEBUG] (use "git reset HEAD <file>..." to unstage) [DEBUG] [DEBUG] modified: pom.xml [DEBUG] [DEBUG] Untracked files: [DEBUG] (use "git add <file>..." to include in what will be committed) [DEBUG] [DEBUG] pom.xml.releaseBackup [DEBUG] prepare.log [DEBUG] release.properties [DEBUG] [INFO] Tagging release with the label buildmetadata-maven-plugin-1.3.1...
          Hide
          Aleksandr Tarutin added a comment -

          I run into an issue where release:prepare would commit and push -SNAPSHOT into the tag. Fortunately, the solution with maven-scm-provider-gitexe above fixed it.

          Thank you,

          AT.

          Show
          Aleksandr Tarutin added a comment - I run into an issue where release:prepare would commit and push -SNAPSHOT into the tag. Fortunately, the solution with maven-scm-provider-gitexe above fixed it. Thank you, AT.
          Hide
          Martin Ellis added a comment -

          Just experienced this bug with maven-release-plugin 2.5 using git.
          Reverting to 2.4.2 fixes the behaviour for me (i.e. commits the pom with a release version).

          Show
          Martin Ellis added a comment - Just experienced this bug with maven-release-plugin 2.5 using git. Reverting to 2.4.2 fixes the behaviour for me (i.e. commits the pom with a release version).
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: