ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject optimization question: override vs condition
Date Tue, 04 May 2004 05:30:30 GMT

 I am optimizing my ant scripts and one thing that I would like to know is 
how logical would it be to use the condition task for setting properties. My 
script has the following format: 

<target name="sample1">
   <antcall target="override"/>
   <antcall target="condition">
       <param name="dummy.value" value="hehehehe"/>

<target name="override">
   <property name="dummy.value" value="hehehe"/>
   <!-- do some other task with dummy.value -->

<target name="condition">
   <condition property="dummy.value" value="hahahaha">
           <isset property="dummy.value">

   <!-- do some other task with dummy.value -->

 Disregarding the performance hit of the antcall task, would you recommend 
that I use the method used in the "override" target over the one used in 
"condition"? I am inclined to using the override way since it is simpler to 
write and more readable but I think the condition approach is safer. As in 
all normal ant tasks, the property specified by the parent target takes 
precedence. In real world usage, the dummy.value changes depending on some 
scenarios but that could be disregarded for the time being. Thank you for 
your time. 

"Programming, an artform that fights back" 

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @

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

View raw message