Merrill Cornish wrote:
Felice,
In the new, improved NAnt, properties now have the option of a
readonly attirbute. Furthermore, any property set because it appeared
in a -D:property=value item on the script command line will
automatically be readonly. So, you can't change in the script the
value of a property passed in via the command line.
really ? When did that change come in ? It doesn't seem right that you
can't set a default in the build file and have it overwritten by the
value passed on the commandline. This is a fairly common use case. The
previous behaviour probably makes more sense.
Ian
including Felice's email for reference
I'm using this version of Nant 0.85:
NAnt 0.85 (Build 0.85.1682.0; net-1.0.win32; nightly; 8/9/2004)
I have this test.build file:
<?xml version="1.0"?>
<project name="test" default="test">
<property name="junk" value="Development 1.4" />
<target name="test">
<call target="DoMain" if="${junk='Development'}" />
<call target="DoBranch" unless="${junk='Development'}" />
</target>
<target name="DoMain">
<echo message="Processing Main..." />
</target>
<target name="DoBranch">
<echo message="Processing Branch..." />
</target>
</project>
When I run: nant /f:test.build -D:junk="Development" I get this:
BUILD FAILED
C:\Documents and Settings\fvittoria\test.build(4,3):
Read-only property "junk" cannot be overwritten.
Why am I getting this?
When I perform the same steps w/ nant-0.85-20040717 everything works fine.
Felice
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users