You would need to run ant with -D option like this...
ant -DclassToRun=blah
Then in your build.xml create a target like this one...
<target name="setclass" unless="classToRun">
<property name="classToRun" value="defaultClass"/>
<target/>
Then use the depends attribute on another target to run this target first.
-Rob Anderson
> -----Original Message-----
> From: ah49@drexel.edu [mailto:ah49@drexel.edu]
> Sent: Tuesday, May 25, 2004 3:35 PM
> To: Ant Users List
> Subject: command line args to ANT
>
>
> hey i would like to supply on the command line an arg for the
> ANT script
> -classToRun=blah
>
> and in my script, if its supplied on command line then
> $classToRun= that value , but if its not supplied then
> $classToRun=defaultClass
>
> how can this be done with if/elses for <property>
>
> ?
> Thanx in advance
>
>
> ---------------------------------------------------------------------
> 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
|