Once you are already in an expression you don't escape the properties
again. Use this:
<if test="${not file::exists(version-info-script)}">
<fail message="version script ${version-info-script} not available"
/>
</if>
BOb
> -----Original Message-----
> From: Nathan Franzen [mailto:[email protected]]
> Sent: Tuesday, April 07, 2009 2:26 PM
> To: [email protected]
> Subject: [NAnt-users] properties in functions
>
> I'm coming to NAnt from an ant background, but I'm trying to adapt.
> The documentation for
> <available/>
> says that it's deprecated & recommends using functions instead.
>
> I prefer to parameterize as much as possible, so I wrote
> <if test="${not file::exists(${version-info-script})}">
> <fail message="version script ${version-info-script} not
> available" />
> </if>
>
> NAnt doesn't like this much:
> Unexpected token 'Dollar'.
> Expression: ${not file::exists(${version-info-script})}
>
> I guess I am forced me to code the file name itself inside the
> function call. Is there another way? Doing conditionals in ant is
> ugly in a different way, admittedly.
>
> -Nate
>
>
------------------------------------------------------------------------
--
> ----
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> NAnt-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nant-users
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users