ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <ninju_bo...@yahoo.com>
Subject RE: <assert> doesn't work as expected
Date Wed, 07 Sep 2005 16:34:25 GMT
Let's start from the beginning... did you set the
property ant.enable.asserts when running the target?

--- "Rebhan, Gilbert" <Gilbert.Rebhan@huk-coburg.de>
wrote:

> 
> Hi, Ben
> 
> that's not possible cause the for loop i want
> to decorate with assert is an inner loop of another
> for loop
> The property is set in the outer loop.
> 
> Checking if property isset ain't necessary, cause if
> an error occurs
> with loadfile (setting the property) build fails
> automatically.
> 
> I just wanted to know how to get assert working
> correctly
> if i need it
>  
> Gilbert
> 
> -----Original Message-----
> From: Burgess, Benjamin
> [mailto:BBurgess@tiaa-cref.org] 
> Sent: Wednesday, September 07, 2005 3:17 PM
> To: Ant Users List
> Subject: RE: <assert> doesn't work as expected
> 
> 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:Gilbert.Rebhan@huk-coburg.de] 
> 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="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
> 
> 
> 
>
**************************************************************
> 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:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 






	
		
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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


Mime
View raw message