ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Lin <y...@yahoo.com>
Subject RE: Is property in Ant global?
Date Sat, 13 Mar 2004 23:33:08 GMT
Simon,

Thanks!  That works!

Gloria

--- Simon Toens <stoens@bea.com> wrote:
> Hi Gloria,
> 
> Properties in Ant are immutable. So once you defined a property, you cannot redefine
it. In your
> case, you could get around this problem by setting "inheritAll" (attr on Ant task) to
false when
> you call file B from file A. That means that Ant will not pass any properties along in
the call.
> In that case, when B runs, it would not know about any of the properties set by A, and
hence
> could define properties that have the same name as the properties in A.
> 
> Regards,
> 
> Simon
> 
> -----Original Message-----
> From: Yan Lin [mailto:yl7b@yahoo.com]
> Sent: Saturday, March 13, 2004 2:41 PM
> To: user@ant.apache.org
> Subject: Is property in Ant global?
> 
> 
> Hi,
> 
> I run into following senario:
> 
> I have two ant files A and B, which locates in different directories and deals with java
files
> in
> different directories as well.  
> 
> In both files, at the beginning, I set properties like "src.dir", "bin.dir" etc. which
set to
> different directories.  Since they are in different files, I use the same property names.
  
> 
> File A needs to call file B.  However, it turns out that when file A calls file B, file
B will
> confuse the properties set by file A with its own ones.
> 
> I wonder why.  Any help is welcomed!
> 
> Thanks in advance!
> 
> Gloria
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message