Are you declaring the property in your build file using?:

<property name="bldtype" value=" "/>

Try:

<property name="bldtype" value=" " overwrite="false"/>

Or don't declare it at all and use ${property::exists('bldtype')} to
determine if it has been specified on the commandline.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Sattapattu
Sent: Thursday, April 10, 2008 2:11 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Re ad only Property overwriting


Hi All,

I am trying to understand the behavior and seeking help. 
 I am trying to run nant after specifying a property value at command
prompt. and i am trying to evaluate the property in my .build script
file
i.e 

<target name="Checking_Parameters" description="Checking the parameters
for
build environment"   if="${property::get-value('bldtype') != ' '}">

this line throws me an error saying "Read-only property "bldtype" cannot
be
overwritten." but in the same line if i change from "!=" to "==" the
build
runs fine. 

Infact i am trying to check in the target if there is any value assigned
to
the property, and hence if there is any property the build will move
ahead
or else fail.

So wanted to know if i have missed out on something.

Thanks for your support in advance.
-- 
View this message in context:
http://www.nabble.com/Read-only-Property-overwriting-tp16608582p16608582
.html
Sent from the NAnt - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to