-------- Original Message --------
Subject: FW: [Nant-users] Setting a proprrty from the command line
Date: Thu, 1 Sep 2005 08:52:53 -0700
From: Eck, Brad <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Well, this seemed so promising! I think I must have another issue. First,
inheritall is doc'd as a default of true so stating it shouldn't be a
necesity. Second, the 'unless' command is a great thing so thank you.
However, I still have issues. I think the problem is that it is not setting
my main property in the other targets. So, I call nant on the master with no
param. In this case, the code below seems like it should render a build on
exceptions.build with config=release. But, I am running in Nant-GUI and
using the 'debug' target. So, I would expect a build on exceptions.build
with config=debug (as set in the debug target) but that's not the case. Now,
if I move the project property 'config' to a target property in the 'build'
target then all is well as the 'unless' command takes affect. Why won't a
target property set change the project property or are they 'local' and
therefore not handled the same? If so, how do you set the project property?
<project name="Master">
<property name="config" value="release"
unless="${property::exists('config')}" />
<target name="build" depends="clean">
<nant buildfile="./Exceptions.build" inheritall="true" />
</target>
<target name="debug" depends="build">
<property name="config" value="debug" />
</target>
<target name="release" depends="build">
<property name="config" value="release" />
</target>
</project>
Brad Eck
SitesDynamic
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary Feldman
Sent: Wednesday, August 31, 2005 4:30 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [Nant-users] Setting a proprrty from the command line
Robert Smith wrote:
In that case, you can do something like this:
<property name="config" value="Release"
unless="${property::exists('config')}" />
<nant buildfile="..\products\${build.product}\ProductA\ProductA.build"
inheritall="true">
<properties>
<property name="config" value="${config}" />
</properties>
</nant>
**Thus, it'll carry the property forward into other .build files.**
It shouldn't be necessary to specify both inheritall="true" and explicit
properties. One or the other should suffice.
Gary
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users