You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jkaipa <jk...@gmail.com> on 2009/12/02 20:01:42 UTC

Re: Release Plugin with Flat Multi-Module Projects

I have done enough research and found a few things.
1. 2.0-beta-10 partially addresses this issue, but that is not a desired
solution (will explain this later)
2. Better not to rely on the maven release plugin if you want to save some
time before they fix it completely.

I have multiple flat multi-modules in my project. Ex. There are projects A,
B, C, D, ABCD, K, L, M, KLM, X, Y, Z, XYZ.

ABCD is a project with parent pom in it which will have module entries for
all the projects A, B, C, and D.
KLM is a project with parent pom in it which will have module entries for
all the projects K, L and M and the same way the third one.

With the plugin 2.0-beta-9, what I see is the same as yours. If I build
ABCD, i.e my working directory will be /trunk/ABCD/ the release plug-in is
tagging only the sources under the project ABCD/. Though the module
references are there in ABCD/pom.xml, tagging A, B, C and D are ignored.

I have come across a fix in 2.0-beta-10 and I applied those patches on the
top of 2.0-beta-9 to see how it works. What is happening now is, instead of
considering the files under ABCD/, at the time of tagging it is going a step
back and tagging all projects from that directory. i.e All projects A, B, C,
D, ABCD, K, L, M, KLM, etc., all are being tagged now.

Actual solution desired is, if you build ABCD, it suppose to tag A, B, C, D,
the same way if you build KLM, it suppose to tag K, L, M with the next tag
in sequence. etc.,

In my scenario, I cannot have one pom in the trunk/ as I have multiple
projects under trunk. 

Finally, what I did was, stopped using the release plugin and did the things
manually using direct svn commands. 1. Created a file under ABCD
(projects.txt) which will have A, B, C, D (project names) each in a new
line. 2. after the maven clean install, I execute the script, which will
read that file projects.txt and gets all the projects which are the child
projects of ABCD project and will tag each of them. Note: Am I passing the
tag each time when I build the project? NO. I am using hudson, and which has
a few environment variables and one is the build number. I have passed this
number with a desired prefix to have a tag name appear like
ABCD_x_%BUILD_NUMBER%. Each time I build for release, it takes a different
number for tag and tags all projects related to ABCD. In the same way, it
will do for KLM and XYZ.

I had spent unnecessarily a lot of time in research of this.

Thanks,
Guru


Neil Chaudhuri-2 wrote:
> 
> I have a flat multi-module project as follows:
> 
> myapp-parent
> --pom.xml
> myapp-persistence
> --pom.xml
> myapp-services
> --pom.xml
> 
> The parent module is simply inherited by the others, and services
> aggregates persistence.
> 
> I am using SVN SCM and Maven Release Plugin 2.0-beta-9. My goal with each
> release is simply to create a folder in the tags directory that looks as
> follows:
> 
> <SVN ROOT>/myapp/tags/
> --myapp-0.8.0
> ----myapp-parent-0.8.0
> ------<All parent files>
> ----myapp-persistence-0.8.0
> ------<All persistence files>
> ----myapp-services-0.8.0
> ------<All services files>
> 
> When I run the Maven Release Plugin at the parent pom level, all I get is
> this:
> 
> <SVN ROOT>/myapp/tags
> --myapp-parent-0.8.0
> ----<All parent files>
> 
> Even though it may not be obvious from the high art of dash indentation, I
> have two problems:
> 1) The parent module is not contained in some "larger" folder beneath
> myapp-0.8.0/tags.
> 2) It is only the parent module being tagged.
> 
> Here is my configuration of the plugin in the parent pom:
> 
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-release-plugin</artifactId>
>                 <version>2.0-beta-9</version>
>                 <configuration>
>                    
> <updateWorkingCopyVersions>false</updateWorkingCopyVersions>
>                     <goals>clean install</goals>
>                     <arguments>-Dmaven.test.skip</arguments>
>                     <tagBase>svn://<svn root>/<myapp>/tags</tagBase>
>                 </configuration>
>             </plugin>
> 
> After doing some research, I discovered the following:
> http://jira.codehaus.org/browse/MRELEASE-261. Here it says that Maven
> Release Plugin 2.0-beta-10 should support multi-module projects and that
> in fact the issue I an seeing is closed.
> 
> At long last, here are my questions:
> 
> 1) Is my desired tag structure (myapp-0.8.0 folder beneath tags and
> containing all the flat modules) possible with the currently released
> plugin? How would I do it?
> 2) Is the fact I am not tagging the other modules a result of the same
> issue addressed by that JIRA page, or am I mixing things up and just doing
> something wrong with my current configuration? 
> 3) Will what I want be possible with the next version? When is the next
> version due?
>  
> Please let me know if I need to clarify anything. I appreciate your
> insight.
> 
> Thanks.
> 
> 

-- 
View this message in context: http://old.nabble.com/Release-Plugin-with-Flat-Multi-Module-Projects-tp26040211p26614408.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org