Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-1016

mvn release:branch fails on Windows to commit changed pom in branch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.5.3
    • 3.0.0-M4
    • branch
    • None
    • Apache Maven 3.3.9
      Java version: 1.8.0_60, vendor: Oracle Corporation
      OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
      git version 2.16.2.windows.1

    Description

      I need to create a branch from a tag. Imagine branching from a 1.0 tag, the following should work:

      git checkout project-1.0
      
      mvn release:branch -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true -DbranchName=1.0.x -DreleaseVersion=1.0.1-SNAPSHOT
      
      git checkout 1.0.x
      

      Alas, the pom.xml in the new branch still references version 1.0 (not 1.0.1-SNAPSHOT), and the <scm><tag> references the tag, not the branch.

      This looks like MRELEASE-881 was simply never resolved.

      If I run a Dry Run, like:

      mvn release:branch -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true -DbranchName=1.0.x -DreleaseVersion=1.0.1-SNAPSHOT -DpushChanges=false -DdryRun=true
      

      I can see the correct updates in pom.xml.branch.
      Note that there are no differences between pom.xml and pom.xml.next.

      Why is pom.xml.branch not being captured in the branch?

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              awhitford Anthony Whitford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: