Hi Ken-
1) you'll need to set overwrite attribute to true e.g.
<property name="TestProperty" value="foo" overwrite="true"/>
2)The user MUST HAVE write privileges to the folder in which he is writing
so user fu can overwrite bar.txt
chown fu bar.txt
HTH
Martin-
----- Original Message -----
From: Ken Parrish
To: nant-users@lists.sourceforge.net
Sent: Monday, March 03, 2008 11:06 AM
Subject: [NAnt-users] Command line properties - Can you explain this message?
I am setting a property from the command line. It seems to work, but I get a
message indicating that I cannot overwrite the property, yet the property does
in fact get set. Can anyone help explain this?
______________
Nant Script:
<?xml version="1.0"?>
<project name="TestBuild" default="default" basedir=".">
<property name="TestProperty" value="foo" readonly="false" />
<target name="*">
<echo message="TestProperty = ${TestProperty}" />
</target>
</project>
______________
Command Line:
nant -D:TestProperty=bar
______________
Output:
NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net
Buildfile:
file:///C:/Gomez/svn/Source/GPNCore/trunk/Applications/test/test.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: default
[property] Read-only property "TestProperty" cannot be overwritten.
default:
[echo] TestProperty = bar
BUILD SUCCEEDED - 0 non-fatal error(s), 1 warning(s)
Total time: 0 seconds.
______________
Thanks,
Ken Parrish
Gomez, Inc.
------------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------------
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users