An easier solution would be to pull the for loop into its own target and then add an if="your-property" to the target.
Ben -----Original Message----- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 07, 2005 6:11 AM To: user@ant.apache.org Subject: <assert> doesn't work as expected 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] ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]