maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: Migration from Ant to Maven2
Date Tue, 02 Nov 2010 22:21:48 GMT
Maven Yu wrote:

> Hi all,
> Currently I am working on migrating my project from Ant to Maven2.
> However, I encountered some issues and I am not sure how do I do that in
> Maven.
> 
> In Ant, subset of source code will be complied sequentially with different
> jars. Once done, the compiled classes will be packed in to jar file.
> 
>  <target name="tomcat5.5-valve" depends="sources-uptodate"
> unless="uptodate.sources">
>         <javac destdir="${build.classes.dir}" srcdir="${src.dir}"
>         debug="on"
> source="1.5">
>                <include name="**/Tomcat55LoginValve.java"/>
>                <classpath refid="**/tomcat55/*.jar"/>
>         </javac>
>  </target>
> 
>  <target name="tomcat5.0-valve" depends="sources-uptodate"
> unless="uptodate.sources">
>         <javac destdir="${build.classes.dir}" srcdir="${src.dir}"
>         debug="on"
> source="1.5">
>                <include name="**/Tomcat50LoginValve.java"/>
>                <classpath refid="**/tomcat50/*.jar"/>
>         </javac>
>  </target>
> 
> <target name="build-jar" depends="tomcat5.5-valve,tomcat5.0-valve"
> unless="uptodate.sources">
>     <!-- pack classes into jar file -->
> </target>
> 
> Does anyone know how this can be achieved by Maven?

Build an own project for each of the variants and use later on another 
project with the shade plugin to put all together.

> Or does anyone know any maven-plugin can do this?

You cannot have multiple dependency trees in the same lifecycle. This is 
nothing a plugin can solve.

- Jörg


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


Mime
View raw message