geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <gianny.dam...@optusnet.com.au>
Subject Re: Migrating to maven 2
Date Wed, 15 Feb 2006 13:25:27 GMT
Jacek Laskowski wrote:

>2006/2/15, Gianny Damour <gianny.damour@optusnet.com.au>:
>  
>
>>Hi,
>>
>>I also think that we should call m2 from m1 and avoid to maintain a dual
>>build during the migration. As pointed out by Dain, we could easily call
>>m2 from m1 by redefining the clean and build goals of m1 to invoke m2
>>clean and m2 install respectively:
>>
>><project default="rebuild" xmlns:ant="jelly:ant">
>>
>>    <goal name="clean">
>>        <ant:exec executable="mvn.bat">
>>            <ant:arg line="clean"/>
>>        </ant:exec>
>>    </goal>
>>
>>    <goal name="build">
>>        <ant:exec executable="mvn.bat">
>>            <ant:arg line="install"/>
>>        </ant:exec>
>>    </goal>
>>
>></project>
>>    
>>
>
>Then I don't understand why it would save us any work *now*? How could
>m1 and m2 know about the dependencies if there were no project.xml or
>pom.xml, respectively? Once we provide pom.xml's, I understand it
>would be the next step to just call off m2 from m1, but it's not
>possible now.
>  
>
It save us from the extra work of ensuring that the m2 build works 
properly all along the migration. At this stage, we could call m2 from 
m1 for each module having a pom.xml file and I think that this is 
achievable right now.

Basically, this is how I see a migration module by module working:
1. take one module;
2. write its pom.xml;
3. remove from its project.xml all the external dependencies, i.e. the 
non Geronimo dependencies (they are no more required as they are now 
defined by pom.xml); and
4. update its maven.xml to invoke the relevant M2 build goal.

The M1 reactor still drives the multiproject build. This means that we 
do not update the top level maven.xml file. When all the projects of a 
given multiproject build, e.g. new1, has been migrated, we let M2 drives 
the multiproject build.

>BTW, what benefit would give us the above snippet? Why would I call
>maven rather than mvn on the command line when pom.xml's are
>available?
>  
>
 From the top level root source, we call maven which delegates 
transparently to mvn if the module is M2 enabled.

>  
>
>>BTW, indeed, maven-one-plugin installs a m2 artefact into the local
>>maven repo.
>>    
>>
>
>Wait, the local maven repo? I say nothing about the local repo, which
>I understood could be drawn from 'indeed' of yours.
>  
>
Sorry - I was sure that you wanted to highlight the fact that a mix 
M1-M2 build was requiring M2 to be able to get some of its dependencies 
from a local M1 repository vice-versa.

Thanks,
Gianny

>  
>
>>Gianny
>>    
>>
>
>Jacek
>
>--
>Jacek Laskowski
>http://www.laskowski.org.pl
>
>
>
>  
>



Mime
View raw message