In your build file, declare any properties that you may specify on the command-line with overwrite="false". This will prevent the "readonly property cannot be overwritten" message.
e.g.: <property name="bldtype" value="default" overwrite="false"/> The message from NAnt refers to the property task attempting to overwrite a property already assigned in the command-line, not the other-way-round, if you see what I mean. If you always specify the property on the command-line, and there is no default value, you do not need the <property/> task at all. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sattapattu Sent: Monday, April 14, 2008 9:29 AM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Re ad only Property overwriting Hi Bob, It is still the same, i have noticed that whenever i want to assign a value to a property via at runtime it does get assigned but it gives out a warning saying "readonly property "***" cannot be overwritten" Can anyone please provide me with an example as to check that the property doesn't contain empty values. Thanks for your patience and time. Regards. SS Bob Archer wrote: > > You might just try changing it to > > if="${bldtype}" > > I think that will return true if the prop exists, and false if it > doesn't. > > I think you can also do: > > If="${bldtype == ''}" > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Sattapattu > Sent: Thursday, April 10, 2008 9:11 AM > 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/j avaone > _______________________________________________ > NAnt-users mailing list > NAnt-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users > > -- View this message in context: http://www.nabble.com/Read-only-Property-overwriting-tp16608582p16673816 .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