ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: How to access a XML element from a given file ?
Date Wed, 30 Apr 2003 05:56:00 GMT
On Tue, 29 Apr 2003, Erik Price <eprice@ptc.com> wrote:

> Do properties have a confining scope in Ant build files (like
> variable scope)?

Yes and no.  Well, more no.

Properties are immutable once set and are available through the build
process they are defined in.  Unless you set the inheritall attribute
of <ant> and <antcall> to false, the property is also available to the
called build files.  So in this sense, all properties are global.

A certain kind of scoping happens when you use <ant> or <antcall>.
Properties that have been set in the "child build" (the one you've
started with <ant>) are not available to the "parent build" (the one
that contained the <ant> task).

> Does this mean the property is accessible from another target?

In general, they are.

Stefan

Mime
View raw message