ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: properties
Date Mon, 10 Sep 2001 09:34:29 GMT
On Mon, 10 Sep 2001 19:08, JohnA wrote:
> I've searched the doc for information about properties in the doc but I
> can't seem to find a clear answer to:
>
> 1) what are the built-in properties, if any?
>     in other words, if I don't define any <property .../> are there still
> some values I can get to using ${}?
>
>  I know that
>      <project name="xx">
>      <jar jarfile="${project.name}.jar""/>
> doesn't work because I tried it...

Check out the ant manual for that.

> 2) what are the scoping rules for properties?
> It seems that if a property is defined
>
> <project>
>   <property name="x" value="val"/>
>   ...
> </project>
>
> then it is visible to all targets. But if it is defined in a target, it is
> visible in that target and then to all subsequent targets. But I'm only
> guessing.

yep. 

> what are the rules around overrides?

you can't overide in the same project. You can "fake" it using antcall or ant 
and specifying property parameters to it however in same project properties 
are immutable.

> e.g. if a property is defined in the <project> </project> and also defined
> in a target, what value is used in subsequent targets?

The first one that gets defined.

-- 
Cheers,

Pete

---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".
---------------------------------------------------------

Mime
View raw message