ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
Subject Re: AW: Compilation of java files
Date Thu, 24 Apr 2003 08:00:23 GMT

Thanks to everyone,i got one more queri in my mind if i use classpath refid in each javac
command like this

<project name="try" default="all" basedir=".">
	<target name="first">
	<javac >
		<classpath refid="classpath"/>
	</javac>
	</target>   and

	<target name="second">
	<javac >
		<classpath refid="classpath"/>
	</javac>
	</target>

	<target name="all" depends="first,second">
		<javac >
			<classpath refid="classpath"/>
	</javac>
	</target>
</project>
and when i run ant command which takes each target for compileation then dont you think it
will take longer time to build a project as each time each target will go for classpath and
will set classpath .
just asking i had doubt in my so i asked this question.

thnaks 
regards
pritesh
--- "Emmanuel Feller" <Emmanuel.Feller@free.fr> wrote:
>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 Matrne
>>
>> > -----Ursprngliche 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
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

_____________________________________________________________
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

Mime
View raw message