Cool thanks.  However that might want to be clarified in the docs.  I
assumed from "Specifies whether the value of a property should be
overwritten if the property already exists (unless the property is
read-only). The default is true. " that overwrite="true" meant that it could
be over written.  Obviously that was an incorrect assumption.

Kevin

-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 01, 2004 2:03 PM
To: Kevin Dickover; [EMAIL PROTECTED]
Subject: Re: [Nant-users] Params vs properties redux was: Nant .85 not
working with Draco.Net-Again

Kevin,

Just set overwrite to "false" :

<project name="Proptest" default="testProperty">
    <property name="ENV" value="DEV" overwrite="false" readonly="false" />
    <target name="testProperty">
        <echo message="${ENV}" />
    </target>
</project>

Hope this helps,

Gert

----- Original Message ----- 
From: "Kevin Dickover" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 7:54 PM
Subject: Re: [Nant-users] Params vs properties redux was: Nant .85 not 
working with Draco.Net-Again


> Assume a sample build file
>
> <project name="Proptest" default="testProperty">
> <property name="ENV" value="DEV" overwrite="true" readonly="false"
> />
> <target name="testProperty">
> <echo message="${ENV}" />
> </target>
> </project>
>
> When this is run the output is
>
> C:\Temp\nantest>C:\nant\bin\NAnt.exe
> NAnt 0.85 (Build 0.85.1684.0; net-1.0.win32; nightly; 8/11/2004)
> Copyright (C) 2001-2004 Gerry Shaw
> http://nant.sourceforge.net
>
> Buildfile: file:///C:/Temp/nantest/test.build
> Target(s) specified: testProperty
>
>
> testProperty:
>
>     [echo] DEV
>
> BUILD SUCCEEDED
>
> Total time: 0.1 seconds.
>
> However when I try to set ENV on the command line I lose - output follows
>
> C:\Temp\nantest>C:\nant\bin\NAnt.exe -D:ENV=JOE
> NAnt 0.85 (Build 0.85.1684.0; net-1.0.win32; nightly; 8/11/2004)
> Copyright (C) 2001-2004 Gerry Shaw
> http://nant.sourceforge.net
>
> Buildfile: file:///C:/Temp/nantest/test.build
> Target(s) specified: testProperty
>
>
> BUILD FAILED
>
> C:\Temp\nantest\test.build(2,3):
> Read-only property "ENV" cannot be overwritten.
>
> Total time: 0 seconds.
>
>
> Do I really need to go through the absurd little dance of setting up two
> properties, one to accept command line input and one to set a default 
> value
> if the command line property has not been set?  Or is my build bad?  As 
> you
> can see I am using a fairly recent nightly build...
>
> Kevin Dickover
>
>
____________________________________________________________________________
____________________
>
> This electronic mail (including any attachments) may contain information 
> that is privileged, confidential, and/or otherwise protected from 
> disclosure to anyone other than its intended recipient(s). Any 
> dissemination or use of this electronic email or its contents (including 
> any attachments) by persons other than the intended recipient(s) is 
> strictly prohibited. If you have received this message in error, please 
> notify us immediately by reply email so that we may correct our internal 
> records. Please then delete the original message (including any 
> attachments) in its entirety. Thank you.
>
> 

________________________________________________________________________________________________

This electronic mail (including any attachments) may contain information that is 
privileged, confidential, and/or otherwise protected from disclosure to anyone other 
than its intended recipient(s). Any dissemination or use of this electronic email or 
its contents (including any attachments) by persons other than the intended 
recipient(s) is strictly prohibited. If you have received this message in error, 
please notify us immediately by reply email so that we may correct our internal 
records. Please then delete the original message (including any attachments) in its 
entirety. Thank you.

Reply via email to