Bugs item #1073214, was opened at 2004-11-25 15:47
Message generated for change (Settings changed) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1073214&group_id=31650

Category: Core
Group: cvs
>Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: john roland (jroland)
Assigned to: Gert Driesen (drieseng)
Summary: command line property

Initial Comment:
Hi
I've got a warning message each time i try to set a 
property with the  -D swith.
here is a sample.

name file:

<project xmlns="http://nant.sf.net/schemas/nant-
0.85.win32.net-1.0.xsd" default="go">
        <property name="name" value="john doe" />
        
        <target name="go">
                <echo message="Hello ${name}"/>
        </target>
</project>


command line:
nant -D:name="John smith"

message: 

[property] Read-only property "{0}" cannot be 
overwritten.

It seems like the command line parser is creating an 
empty parameter for each parameter. 

keep it up !!!

thank you
John Roland

----------------------------------------------------------------------

Comment By: Gert Driesen (drieseng)
Date: 2004-11-25 17:44

Message:
Logged In: YES 
user_id=707851

The error message was incomplete. This was fixed since.

However, the behavior is correct. Each property that is set 
on the command line is read-only by design.

You can avoid that warning from being output in the build log 
by using :

<property name="name=" value="john doe" 
unless="${property::exists('name')}" />

This will only try to set that property if it hasn't been set 
before.

Hope this helps !



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1073214&group_id=31650


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to