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

Flat Layout branching not correctly supported - CONTAINS PATCH FOR 2.1 version of plugin - please apply

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Auto Closed
    • 2.1
    • None
    • branch
    • None
    • Maven 2.2.1/maven3.0.X JDK6/7
    • Patch

    Description

      When trying to create a branch with the commitByProject=true value, it is not taken into account.
      So I created a patch on for the 2.1 version.

      The attached patch consist of the following:

      in the maven-release-manager

      1. the MRELEASE-619
      2. some extra logging concerning the use of commitByProject property in the AbstractScmCommitPhase.java

      in the maven-release-plugin

      1. I've put the commitByProject in the AbstractReleaseMojo, and used it in both the BranchReleaseMojo and PrepareReleaseMojo in similar way.

      Can you guys create a version 2.1.1 fix with this patch. There seem to be a lot of people out there having troublwe releasing a Flat Layout multimodule.

      I do it in the following way...

      /PARENT/pom.xml
      /MODULE1/POM.XML
      ...
      

      and in the parent pom.xml

      <modules>
         <module>../MODULE1/pom.xml</modules
         ...
      </modules>
      

      and in SVN

      project/trunk/PARENT   (0.0.10-SNAPSHOT)
             /trunk/MODULE1  (0.0.10-SNAPSHOT)
             /trunk/....     (0.0.10-SNAPSHOT)
      

      When releasing this application we perform the following commands

      First checkout the application... and run the following command to release a 0.0.10-SNAPSHOT version on the trunk.
      Also make sure you did fill in the SCM information.

      1. release:clean release:branch with the following values set username=<username> -Dpassword=<password> -DcommitByProject=true -DautoVersionSubmodules=true -DreleaseVersion=0.0.10RC1 -DdevelopmentVersion=0.0.11-SNAPSHOT -DupdateBranchVersions=true -DbranchName=project-0.0.10_branch

      This will update your trunk value to 0.11-SNAPSHOT and create a branch with version 0.0.10RC1-SNAPSHOT
      Svn will look like this

      project/trunk/PARENT   (0.0.11-SNAPSHOT)
             /trunk/MODULE1  (0.0.11-SNAPSHOT)
             /trunk/....     
             /branches/project-0.0.10_branch/PARENT  (0.0.10RC1-SNAPSHOT)  
             /branches/project-0.0.10_branch/MODULE1 (0.0.10RC1-SNAPSHOT)
             /branches/project-0.0.10_branch/...
      

      Now, when this is done checkout this newly created branch
      and perform the following

      1. release:clean release:prepare release:perform with the following values -Dusername=<username> -Dpassword=<password> -DcommitByProject=true -DautoVersionSubmodules=true

      This will release your 0.0.10RC1-SNAPSHOT as 0.0.10RC1, creates a tag for it and an upgrade the version number on the branch to 0.0.11RC2-SNAPSHOT
      Svn will look like this

      project/trunk/PARENT   (0.0.11-SNAPSHOT)
             /trunk/MODULE1  (0.0.11-SNAPSHOT)
             /trunk/....     
             /branches/project-0.0.10_branch/PARENT  (0.0.10RC2-SNAPSHOT)  
             /branches/project-0.0.10_branch/MODULE1 (0.0.10RC2-SNAPSHOT)
             /branches/project-0.0.10_branch/...
             /tags/project-0.0.10RC1/PARENT (0.0.10RC1)
             /tags/project-0.0.10RC1/MODULE1 (0.0.10RC1)
             /tags/project-0.0.10RC1/...
      

      Hope this helps...

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              ndgroote Nico De Groote
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: