ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Compilation of java files
Date Wed, 23 Apr 2003 11:31:47 GMT
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">

    <target name="clean">
        <delete><fileset dir="src" includes="**/*.class"/></delete>
    </target>

    <target name="first">
        <property name="first" value="yes"/>
        <antcall target="compile"/>
    </target>

    <target name="second">
        <property name="second" value="yes"/>
        <antcall target="compile"/>
    </target>

    <target name="both">
        <property name="first" value="yes"/>
        <property name="second" value="yes"/>
        <antcall target="compile"/>
    </target>

    <target name="compile">
        <javac srcdir="src">
            <include name="a/**.*" if="first"/>
            <include name="b/**.*" if="second"/>
        </javac>
    </target>

</project>



Jan Matèrne

> -----Urspr√ľngliche Nachricht-----
> Von: Pritesh saharey [mailto:pritesh@sqatester.com]
> Gesendet am: Mittwoch, 23. April 2003 13:16
> An: Apache mailing list
> Betreff: Compilation of java files
> 
> Hi all,
> I would like to compile the classes according to my targets,suppose 
> here is my directory structure src/hh/uu/mbd and src/hh/uu/cid
> and when i compile these files using ant it takes all files 
> from mbd and cid folder.
> now if for project
> 
> <project name="try" default="all" basedir=".">
> 	<target name="first">
> 	</target>   and
> 
> 	<target name="second">
> 	</target>
> 
> 	<target name="all" depends="first,second">
> 	</target>
> </project>
> now when i run "ant first" command, ant should compile files 
> of mbd folders only
> and when i run "ant second" command, ant should compile files 
> of cid folders only
> and when i run just "ant" command, ant should compile all files .
> 
> can anybody give me solution
> pritesh
> 
> _____________________________________________________________
> Join SQAtester.com Community  ---> 
> http://www.sqatester.com/testersarea/joinus.htm
> 
> _____________________________________________________________
> Select your own custom email address for FREE! Get 
> you@yourchoice.com w/No Ads, 6MB, POP & more! 
> http://www.everyone.net/selectmail?campaign=tag
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message