Hi 
 
I would like to write my first maven module that does releases over all the
dependencies of a main module. I am interested in your opinion,
recommondations and critical feedback. 
 
Let me first illustrate why I would like to do that. The
maven-release-plugin does a release in a way that it:
 
1. Adds a tag to the repository for the main module
2. Releases al artifacts of the main module (JARs, website)
3. Deploys all artifacts of the main module to the remote repository (JARs
for bitecode, sources and javadoc)
4. Allows to change the development versions of the dependent modules
 
What I miss in this approach is:
 
1. The sites of all dependent modules (including test results and coverage,
javadocs, dependencies)
2. Dependent modules artifacts in the repository (distinctly versioned JARs
for bitecode, sources and javadoc)
3. Distinct versions of the dependent modules when copying all the needed
libraries to the official website (say in a JNLP release)
 
The idea of the new module would be to iterate through all dependent modules
from dependency tree leaf towards its root and:
 
1. Investigate the existing tags on the SVN repository to find one for the
dependent module
2. If the dependent module has code changes since the tags revision:
2a. Alter the POM dependent module so it reflects the dependencies to its
dependent modules correctly by replacing SNAPSHOT versions with distinct
tagged versions
2b. Release the dependent module
3. Else do not release the module but keep the tagged version as the one to
replace SNAPSHOTs in subsequent dependent modules
 
Let me illustrate that with a concrete example. Say I have the following
multi-module project dependencies for my main module
"ch.xmatrix.ups.tools.ust" (filtering out only my own dependencies):
 
ch.xmatrix.ups.tools.ust               2.1-SNAPSHOT
+- ch.xmatrix.ups.tools.common         2.0-SNAPSHOT
|  +- ch.xmatrix.common.utils-all      2.3-SNAPSHOT
|  |  \- ch.xmatrix.common.icon        1.4-SNAPSHOT
|  +- ch.xmatrix.ups.data.taxa         2.0-SNAPSHOT
|  \- ch.xmatrix.ups.data.constraints  SNAPSHOT
+- ch.xmatrix.ups.data.sessions        SNAPSHOT
+- ch.xmatrix.ups.data.courses         SNAPSHOT
\- ch.xmatrix.ups.server.client        2.0-SNAPSHOT
   \- ch.xmatrix.ups.server.interface  2.0-SNAPSHOT
 
And there would be no current tag for ch.xmatrix.common.utils-all,
ch.xmatrix.ups.data.constraints, ch.xmatrix.ups.server.interface and
ch.xmatrix.ups.tools.ust without any changes in the meantime. I would like
to be prompted for the desired development version change of each these
remaining dependent modules. If I choose to keep the same development
version, then the release order, the current development version would stay
and the release version of this example would be:
 
ch.xmatrix.common.utils-all      2.3-SNAPSHOT  2.3
ch.xmatrix.ups.data.constraints  SNAPSHOT      1.0
ch.xmatrix.ups.server.interface  2.0-SNAPSHOT  2.0
ch.xmatrix.ups.tools.ust         2.1-SNAPSHOT  2.1
 
I currently achive that with a perl script. However, I wonder whether such a
task would make sense to be done as a maven module
(maven-releasetree-module). If it would make sense, I would see the
following main limitation: My approach would use other maven modules like
maven-dependency-modules and maven-release-module. Having had a quick look
at the maven modules howto, this seem not to be a valid approach. Each
module should be self-contained and independent of others.
 
Any advices, recommondations, critical feedback, thoughts would be highly
appreciated...
 
Thanks for feedback in advance
Daniel
 



 <http://www.xmatrix.ch/>               
        

Daniel Frey
Senior Software Engineer        xmatrix
Kellerweg 65
CH-8055 Zürich  
[email protected]
http://www.xmatrix.ch <http://www.xmatrix.ch/>          
tel: 
mobile:         +41 (44) 241 64 46
<http://www.plaxo.com/click_to_call?src=jj_signature&To=%2B41+(44)+241+64+46
&[email protected]> 
+41 (77) 425 28 57
<http://www.plaxo.com/click_to_call?src=jj_signature&To=%2B41+(77)+425+28+57
&[email protected]>          
        

        
 

Reply via email to