ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Mark Bram <>
Subject Detecting -D on command line
Date Sat, 20 Nov 2004 01:32:22 GMT
Hi All!

In a script where you need to respond differently to whether or not a 
command line argument has been set, this is the way I am currently 

<target name="subDirOn" if="subDir">
    <property name="subDirString" value="_${subDir}" />
<target name="subDirOff" unless="subDir">
    <property name="subDirString" value="" />

<target name="makeArchive" depends="init, subDirOn, subDirOff">

I do not declare a subDir property declared outside subDirOn or subDirOff 
because I noticed that always triggers subDirOn.

My question?

Is there an easier way to do this? :)

Thanks for any advice!


Robert Mark Bram
B.Comp.(Systems Development/Business Systems)
Doctor of Philosophy Student

School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199

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

View raw message