From: Guy M. <Guy...@gs...> - 2006-10-25 13:20:15
|
Are the properties that you are trying to reset defined in your common include file? If they are then the value would by default be reset to the value in the include. We have a similar situation where we want the properties to have one value by default in all of the component builds but be able to switch the value globally in a master build file. What we do is the set the "overwrite" attribute for the properties in the common include to false. This effectively turns off the property set if it's already defined as would using the "if"/"unless" attributes but with less typing. Hope this helps > -----Original Message----- > From: nan...@li... [mailto:nant-users- > bo...@li...] On Behalf Of Steve Valaitis > Sent: Wednesday, October 25, 2006 12:08 AM > To: nan...@li... > Subject: [NAnt-users] <nant> task not passing properties. >=20 > I have a buildfile(default) with the following in a target: >=20 > <nant target=3D"${build.target}"> > <buildfiles> > <include name=3D"fs.build"/> > <include name=3D"pa.build"/> > </buildfiles> > </nant> >=20 > According to the docs for <nant>, all of the current property values > should be automatically passed to the build files. I assumed it would be > similar to -D:prop=3Dvalue, but the build files process without any change > to their properties. >=20 > I then tried adding the following to my nant task, thinking that this > would make things work, but I still get the same result: >=20 > <properties> > <property name=3D"fresh.build" value=3D"${fresh.build}" = overwrite=3D"true" > readonly=3D"true"/> > <property name=3D"need.checkout" value=3D"${need.checkout}" > overwrite=3D"true" readonly=3D"true"/> > </properties> >=20 > The only way I have gotten things to work is by calling an exec task for > each of the build files, and manually constructing the arguments to pass > over. This seems somewhat brittle, and hackish. Is this behavior to be > expected? Am I doing something wrong? >=20 > All of the build files include a common.build buildfile that has some > properties declared at the global level. Would this be causing the > problem, and if so, can I get around it? >=20 > Thanks, > Steve >=20 > ------------------------------------------------------------------------ - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 > _______________________________________________ > NAnt-users mailing list > NAn...@li... > https://lists.sourceforge.net/lists/listinfo/nant-users |