ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Clarification on definition of "reference"
Date Wed, 03 Jun 2009 08:02:59 GMT
On 2009-06-02, Jim Garrison <Jim.Garrison@troux.com> wrote:

> The ANT docs use the term "reference" in a way that, at least to me,
> is a little confusing.

Which may - at least in part - be caused by the fact that non-native
speakers have written bigger sections of the documentation.  In German
"to refer to" would be "referenzieren" which translates to "to
reference to" in my brain.

> Are the following correct?

>  1.  A "Property" is a name-value pair defined with the <property>
>  tag, and its identifier is the value of the "name=..." attribute

Yes, although there are other tasks that create properties as well.

>  2.  A "Reference" is defined by any object definition using its
>  "id=..." attribute

Yes.

>  (is this aka a "Type"?)

Not necessarily.  A "type" is anything that has been declared via
<typedef>.  Creating instances of types and referring to them by id is
a common usage of types but not the only one.

>  3.  By default (without inheritRefs and nested reference tags),
>  <ant> and <antcall> establish a new scope for reference
>  objects. That is:
>     * At the point in the calling buildfile where the sub-ant is
>     invoked, there exists a set of visible reference objects
>     * In the called buildfile, that set of reference objects is NOT
>     visible

True.  But note that <antcall> reevaluates the same buildfile and may
see references to different objects if they have been declared at the
top level.

>  4.  Reference objects can be made visible inside the sub-build
>  using inheritRefs="true", or by providing explicit nested
>  <reference> tags inside the <ant> or <antcall> that invoked the
>  sub-build.

Yes.

        Stefan

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


Mime
View raw message