You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Noel Sebastien (BIL)" <Se...@dexia-bil.com> on 2003/12/08 15:37:59 UTC

antcall and immutable properties ... Normal ?

Hi everyone,

I am using Ant 1.5. I need a functionality to start a task (via antcall) only if a variable condition is true.
This task should be called multiple times and that is the problem because the "if" attribute of "antcall" only supports PROPERTIES (that are immutable !!!).

Here is an example where i would like to use a file (deletion, touch and so on) if it already exists and to do nothing if it does not exist :

<task          A>
	<antCall target=B><param name="filename" value="file1"/></antCall>
	<antCall target=B><param name="filename" value="file2"/></antCall>
</task>

<task          B        if="$filename_exist">         <!-- <<<<< where and how to set "filename_exist" property which may vary ?? -->
	<!-- actions using parameters $filename --> 
</task>


Maybe there is another task (or another easier way) to do this, tell me it then...
Thank you in advance,

Sébastien NOEL 



---------------------
An electronic message is not binding on its sender.  
Any message referring to a binding engagement must be confirmed in writing and duly signed.
---------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org