ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject <assert> doesn't work as expected
Date Wed, 07 Sep 2005 10:11:20 GMT


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="updatelist.@{Lum}" execute="true">
<for list="${updatelist.@{Lum}}" 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="${updatelist.@{Lum}}" 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message