ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Levente Farkas <>
Subject conditional target
Date Sat, 25 May 2002 17:19:59 GMT
is it possible to write a conditional target in ant?
what I'd like to do to create ONE compile task, but I'd like to use the same
task for debug and optimized compilation too. eg: now I have this
<target name="compile" depends="init" description="compile all sources">
	<javac srcdir="${src}" destdir="${build}" failonerror="false"
		debug="off" optimize="on" 
		<classpath refid="project.classpath"/>
	<rmic base="${build}" includes="**/*Impl.class,**/ComponentBase.class"
			stubversion="1.2" verify="yes" 
			<classpath refid="project.classpath"/>
it'd be useful if I can switch with a command line argument to turn on debug
info and trun off optimization. is it possible somehow?
thanks in advance.

  Levente                               "Si vis pacem para bellum!"

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message