Hi,

antcontrib 1.0b2 / ant 1.6.5 

i want to use the antcontrib / assert task in my script to ensure
that a for loop is only executed if a property has been set.

so i have =

<assert name="[EMAIL PROTECTED]" execute="true">
<for list="[EMAIL PROTECTED]" param="copyfile">
   <sequential>
        <echo message="Kopiere Datei -> @{copyfile}" />
            ...
  </sequential>
</for>
</assert>

in my script.

Now i tested the worst case, when the property hasn't been set.
But the for loop runs nevertheless.
The property bla has not been set =

<assert name="${bla}" execute="true">
<for list="[EMAIL PROTECTED]" param="copyfile">
   <sequential>
        <echo message="Kopiere Datei -> @{copyfile}" />
            ...
  </sequential>
</for>
</assert>

I also put the assert into <sequential> ... </sequential> with same
result.

>From what i read in the antcontrib manual, assert tests for
existence of the given property ?!

Any hints ?

OK i may use if / then ... but assert would be shorter.


Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to