Hi Nathan,
In expressions, properties must be references without braces.
For example:
<if test="${not file::exists(version-info-script)}">
<fail message="version script ${version-info-script} not available"
/>
</if>
Hope this helps,
Gert
-----Original Message-----
From: Nathan Franzen [mailto:[email protected]]
Sent: dinsdag 7 april 2009 20:26
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
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.285 / Virus Database: 270.11.38/2037 - Release Date: 04/02/09
06:09:00
------------------------------------------------------------------------------
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