Hi,

Background: I'm trying to develop a release helper tool for my company. We 
can't use the maven-release-plugin for several reasons. We have a notion that 
is like a "release train" were several projects must be released at the same 
time. These projects can be Maven multi-module projects. These projects can 
have interdependencies (SNAPSHOT). But of course no SNAPSHOT dependency is 
allowed on a project that is not in the release train.

Basically, I'm trying to have a tool to replace the current manual process:
    1) think about release order according to inter dependencies (cycles are 
forbidden)

    2) mvn release:prepare release:perform on first project
    3) update all references to this project (replace SNAPSHOT version by 
released version) in all pom of the release train
    4) mvn release:prepare release:perform on second project
    5) update all references to this project (replace SNAPSHOT version by 
released version) in all pom of the release train
    ... (repeat for all projects of the train)


We already have a "tweak" to allow a full build of the release train with one 
Maven command. We have a tool that create a Maven aggregator pom where each 
submodule is a svn:externals linking to the trunk of each project.

pom.xml (aggregator)

project1 -> svn:externals to another_location/project1/trunk

project2-> svn:externals to another_location/project2/trunk
...

projectN-> svn:externals to another_location/projectN/trunk

Now I try to do step 1 automatically. I want to find release order based on 
inter dependencies of my release train. I found the ProjectSorter class in 
Maven API, but it seems I have to create a MavenProject for each project, and 
each sub module (as it seems this is not recursive).
Is there a better way ?

In fact the best would be to create a graph of interdependencies. Because I 
would also try to detect and prevent this kind of cycle:
project1/submodule1 depend on project2/submodule1
project2/submodule1 depend on project1/submodule2

Thanks for any pointer.

Julien


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to