[ 
http://jira.codehaus.org/browse/MRELEASE-261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235067#action_235067
 ] 

Mike R. Haller commented on MRELEASE-261:
-----------------------------------------

I'd like to share my use case with you to understand why people may have 
'unusual' project structures.
I think that my problem is the same as the one in this issue, but not sure.
So, my apologizes if this does not fit 100% and should be posted to MRELEASE-516

We started with the following set up:
{code}
ModuleA/trunk/pom.xml
ModuleB/trunk/pom.xml
ModuleC/trunk/pom.xml
{code}

These were more or less independent artifacts and the release process was just 
releasing those three artifacts individually.
Every module's pom.xml has its own <scm> element.
After a while, additional modules were implemented and a common parent pom was 
introduced, hence the structure became:

{code}
Parent/trunk/pom.xml
ModuleA/trunk/pom.xml
ModuleB/trunk/pom.xml
...
ModuleY/trunk/pom.xml
ModuleZ/trunk/pom.xml
{code}

Now, the release process for many modules takes up a lot of time and the idea 
is to aggregate all the releases into
a single release step from a release manager point of view. So, a reactor build 
is put on top of the whole thing:

{code}
Everything/trunk/pom.xml (Modules: ModuleA, ModuleB ... ModuleZ)
ModuleA/trunk/pom.xml
ModuleB/trunk/pom.xml
...
ModuleY/trunk/pom.xml
ModuleZ/trunk/pom.xml
{code}

The Everything-pom.xml contains the modules:
{code}
<modules>
        <module>ModuleA</module>
        <module>ModuleB</module>
        <module>...</module>
        <module>ModuleY</module>
        <module>ModuleZ</module>
</modules>
{code}

Then, all the trunks are checked out from SCM (SVN, using the svn:externals 
property) into the local working copy, so they reflect the correct
structure without any 'trunk' folders or relative paths like "../ModuleA".

{code}
pom.xml (from Everything/trunk/pom.xml)
+ ModuleA/pom.xml
+ ModuleB/pom.xml
...
+ ModuleY/pom.xml
+ ModuleZ/pom.xml
{code}

Now, i'm trying to perform a release in the root of this folder, e.g. the 
"Everything" project.
The reactor will prepare all modules, but unfortunately, the SVN tag of each 
module is overwritten and becomes incorrect.
Each module should be committed to its own 'tags/' folder with name and version 
of the module.
However, what actually happens is, the release plugin replaces all SCM URLS of 
each module with the name of the Everything-pom.xml:

Actually in pom.xml.tag: 
<url>scm:svn:.../ModuleA/tags/Everything-1.0/ModuleA/trunk</url>
Expected in pom.xml.tag: <url>scm:svn:.../ModuleA/tags/ModuleA-1.0</url>


> release:prepare should support flat directory multi-module projects
> -------------------------------------------------------------------
>
>                 Key: MRELEASE-261
>                 URL: http://jira.codehaus.org/browse/MRELEASE-261
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>         Environment: linux / maven2 / svn
>            Reporter: paul.whe...@gmail.com
>            Assignee: Maria Odea Ching
>             Fix For: 2.0
>
>         Attachments: flatProject.main.patch, flatProject.test.patch, 
> maven-release-issue.tar.gz, maven-release-issue.zip, 
> MRELEASE-261-sample-project.zip, MRELEASE-261-with-its-v3.patch, 
> MRELEASE-261-with-its.patch, MRELEASE-261.patch, odd-tags.png, 
> PrepareReleaseMojo.patch
>
>
> What I mean by flat file structure firstly.
> parent/pom.xml
> module1/pom.xml
> module2/pom.xml
> .
> .
> .
> module15/pom.xml
> the parent references the modules like so
> <modules>
>               <module>../module1</module>
>               <module>../module2</module>
> .
> .
> .
>               <module>../module15</module>
> </modules>
> When i  release:prepare only the parent project is tagged the modules 
> projects versions are incremented etc but the modules are not tagged in svn.
> I use this structure as i use eclipse as my IDE.
> I would love to see a fix for the issue marked as closed here 
> http://jira.codehaus.org/browse/MRELEASE-138. I am currenrly tagging by hand 
> each submodule of the projects but it would be so nice to have the release 
> plugin do this for me.
> forgive my english.

-- 
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