ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Feller" <Emmanuel.Fel...@free.fr>
Subject Re: AW: Compilation of java files
Date Wed, 23 Apr 2003 12:37:22 GMT
This solution is more easy ... but here you never call the
clean target.

Replace the all target with :
 <target name="all" depends="first,second,clean"/>

Regards,
Emmanuel Feller

----- Message d'origine -----
De : "peter reilly" <peter.reilly@corvil.com>
À : "Ant Users List" <user@ant.apache.org>
Envoyé : mercredi 23 avril 2003 13:46
Objet : Re: AW: Compilation of java files


Surely there is no need for antcall here.

Use:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="all">

     <target name="init">
           <mkdir dir="classes"/>
     </target>

     <target name="clean">
         <delete><fileset dir="classes"/></delete>
     </target>

     <target name="first" depends="init">
         <javac srcdir="src" destdir="classes">
        <include name="hh/uu/mbd/**"/>
          </javac>
     </target>
     <target name="second" depends="init">
         <javac srcdir="src" destdir="classes">
        <include name="hh/uu/cid/**"/>
          </javac>
     </target>
     <target name="all" depends="first,second"/>
</project>

Of course if mdb files depend on cid files, javac will
compile the needed cid
files.

Peter
On Wednesday 23 April 2003 12:31, Jan.Materne@rzf.fin-nrw.de
wrote:
> <?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


------------------------------------------------------------
---------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org





Mime
View raw message