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

                 Key: MRELEASE-636
                 URL: http://jira.codehaus.org/browse/MRELEASE-636
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: branch
    Affects Versions: 2.1
         Environment: Maven 2.2.1, JDK6
            Reporter: Nico De Groote
            Priority: Blocker
         Attachments: release.patch

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 http://jira.codehaus.org/browse/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 havinh troublwe releaseing 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 
-Dusername=<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.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

2) 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... 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to