Larry,

When specifying your properties in the <nant> task, you should mark them as readonly="true" if you want to prevent their value to be change by your child build file.

Regards,
Nick




----Original Message Follows---- From: "Larry Chase" <[EMAIL PROTECTED]> To: "NAnt UserList" <[EMAIL PROTECTED]> Subject: [Nant-users] Property Override Doesn't seem to work Date: Fri, 20 Feb 2004 13:47:30 -0800

I have individual build files that are connected together via a master.build
file and when I pass properties in to override the local properties from the
master.build, the values are not overriding.  Using the attached sample, I
expect a "nant -buildfile:test.build" to echo "c:\projects", however when I
use "nant -buildfile:master.build" I expect a "d:\projects" from the echo,
but I still recieve a "c:\projects"... am I missing something???

test.build:
<?xml version="1.0" encoding="utf-8"?>
<project name="nant" default="build"
xmlns="http://tempuri.org/nant-0.84.xsd";>
 <property name="projects.base" value="c:\projects" />           <!--
project folder root -->

 <!-- builds the application -->
 <target name="build">
  <echo message="projects.base=${projects.base}" />
 </target>
</project>

master.build:
<?xml version="1.0" encoding="utf-8"?>
<project name="nant" default="build"
xmlns="http://tempuri.org/nant-0.84.xsd";>
 <!-- Global properties of the build, passed to each file overriding their
values. -->
 <property name="projects.base" value="d:\projects" /> <!-- project folder
root -->

 <target name="build">
  <nant buildfile="test.build" target="build">
   <properties>
    <property name="projects.base" value="${projects.base}" />
   </properties>
  </nant>
 </target>
</project>

Lawrence Chase
Senior Product Engineer, MCP
Exametric, Inc.
Email:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Web:  <http://www.exametric.com/> www.exametric.com,
<http://www.click2staff.com/> www.click2staff.com
Phone: 858.270.9955 x31
Cell: 858.864.6167 *NEW*
Fax: 858.270.9954

_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.com/




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to