Uh, I'm a little
lost here. Sorry, beginner question.
I want to detect if
a property has/has not been defined and do conditional processing based on
whether or not the property exists. I thought I should
do:
<project
name="test">
<property if="${property::exists(XYZ)}" name="IsItThere" value="yes"/>
</project>
<property if="${property::exists(XYZ)}" name="IsItThere" value="yes"/>
</project>
And then I run
it:
C:\build\BuildIt>nant -f:prop.build
NAnt 0.85 (Build 0.85.2344.0; rc4; 6/2/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net
NAnt 0.85 (Build 0.85.2344.0; rc4; 6/2/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/build/BuildIt/prop.build
Target framework: Microsoft .NET Framework 2.0
Target framework: Microsoft .NET Framework 2.0
BUILD FAILED
C:\build\BuildIt\prop.build(2,3):
Property evaluation failed.
_expression_: ${property::exists(XYZ)}
^^^
Property 'XYZ' has not been set.
Property evaluation failed.
_expression_: ${property::exists(XYZ)}
^^^
Property 'XYZ' has not been set.
Total time: 0 seconds.
But that always
complains that the property isn't defined. Uh, that's what I wanted to
detect...And no, using overwrite="false" is not what I need...this is a
simplified example. Anybody have any
ideas?
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users