[nant-dev] Inherited property values

2003-01-21 Thread John Barstow
I've been wrestling with getting a 'debug' value to cascade properly, and am
beginning to think there's an issue with how properties are defined.
So, this is what I tried:

file1:
project name=file1 default=rel
property name=debug value=true /

target name=rel
property name=debug value=false /
nant buildfile=file2 inheritall=true /
/target

/project

file2:
project name=file2 default=compile
property name=debug value=true /

target name=compile
csc debug=${debug} ... /
/target

/project

Expected results in target='compile'
1) 'nant -f:file1' should result in debug=false (actual was true)
2) 'nant -f:file2' should result in debug=true
3) 'nant -f:file1 -D:debug=true' should result in debug=true
4) 'nant -f:file1' -D:debug=false should result in debug=false

Case 1 appears to be incorrect.  Is inheritall begin ignored?  Do I not
understand properties?  Why are the other three producing expected results?

John C Barstow


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



Re: [nant-dev] Inherited property values

2003-01-21 Thread Scott Hernandez
Inherited properties are not inherited as readonly. There is nothing
stopping a child/called project from changing the value of an inherited
property. If you want to test you can use a ifnot propertyexists=debug
... /ifnot to check for the properties existence before setting it. See
this thread for more background.
http://www.mail-archive.com/nant-developers@lists.sourceforge.net/msg00302.h
tml

Note: inheritall=true is the default.


Hope that helps,
Scott
- Original Message -
From: John Barstow [EMAIL PROTECTED]
To: Nant-Developers (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 5:05 PM
Subject: [nant-dev] Inherited property values


 I've been wrestling with getting a 'debug' value to cascade properly, and
am
 beginning to think there's an issue with how properties are defined.
 So, this is what I tried:

 file1:
 project name=file1 default=rel
 property name=debug value=true /

 target name=rel
 property name=debug value=false /
 nant buildfile=file2 inheritall=true /
 /target

 /project

 file2:
 project name=file2 default=compile
 property name=debug value=true /

 target name=compile
 csc debug=${debug} ... /
 /target

 /project

 Expected results in target='compile'
 1) 'nant -f:file1' should result in debug=false (actual was true)
 2) 'nant -f:file2' should result in debug=true
 3) 'nant -f:file1 -D:debug=true' should result in debug=true
 4) 'nant -f:file1' -D:debug=false should result in debug=false

 Case 1 appears to be incorrect.  Is inheritall begin ignored?  Do I not
 understand properties?  Why are the other three producing expected
results?

 John C Barstow



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers