Nau, Michael wrote:
> <ifnot test="${property::exists('CCNetLabel')}">
>   <echo message="The CCNetLabel property does not exist"/>
> </ifnot>   
>   
No, the <ifnot> task is deprecated.

The right way is
  <if test="${not property::exists('myProp')}">...

> From: ... On Behalf Of Jay Williams
> Sent: Monday, June 19, 2006 10:30 AM
>
> In the documentation I see how to test if a property exists:
>
> <if propertyexists="myProp">
>     <if propertytrue="myProp">
>         <echo message="myProp is '${myProp}'" />
>     </if>
> </if>
>   
The propertyexists attribute is also deprecated.  The correct way to do 
this is:

  <if test="${property::exists('myProp') and myProp}">...

assuming you're sure that the value of myProp, if it exists, will 
evaluate to a NAnt boolean value.  If not, you might need to rewrite the 
last part as

   ... and myProp == 'SomeValueForTrue'}...

Gary



_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to