Title: Possible bug with property::exists

You need to enclose the property name in single quotes when using property::exists, like this:

 

<property name=”SingleBuildFile” value=”${property::exists(‘SingleBuildDirectory’)}” />

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Byrd, Payton
Sent: Wednesday, November 10, 2004 2:14 PM
To: '[EMAIL PROTECTED] Sourceforge. Net'
Subject: [Nant-users] Possible bug with property::exists

 

OK, simple project:

<project>

    <property name="SingleBuildFile" value="${property::exists(SingleBuildDirectory)}" />

    <echo message="!!!! ${SingleBuildDirectory}  ${SingleBuildFile}" />

    <echo message="Using single build file mode." if="${SingleBuildFile}" />

</project>

If you call it with:  nant -D:SingleBuildDirectory=\EBusiness\Utilities

You get:

     [echo] !!!! \EBusiness\Utilities  False

If you call it with: nant

You get:

BUILD FAILED

D:\EBusiness\default.build(4,26):

Property evaluation failed.

_expression_: ${property::exists(SingleBuildDirectory)}

                               ^^^^^^^^^^^^^^^^^^^^

    Property 'SingleBuildDirectory' has not been set.

Total time: 0.2 seconds.

Shouldn't the first use case return True for ${SingleBuildDirectory} ?

 

Payton Byrd

Trane eBusiness

QED Team

Phone: 931-905-5386 

Fax: 931-648-5901

Reply via email to