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?
Or does anyone know any maven-plugin can do this?

Thanks a lot
Tsun

Reply via email to