ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebastian ssmoller <sebastian.ssmol...@gmx.net>
Subject Re: <ant/> and <propertyset/>
Date Tue, 17 Aug 2004 07:03:48 GMT
(...)
> 
> but now it seems that properties passed by <propertyset/> are NOT
> inherited
> (?) In my project these properties are passed exactly one "level" into
> the
> newly created project.
> 
> whats wrong ?

i had a deeper look at the code and i found out that the following code
is used:

- for <property/>
--> overwriteProperties (Ant.java) --> copyInheritedProperties
(Project.java) --> copyInheritedProperties (PropertyHelper.java) -->
setInheritedProperty (PropertyHelper.java) --> userProperties.put(...)
(PropertyHelper.java)

- for <propertyset/>
--> addPropertySet (Ant.java) --> initializeProject (Ant.java) -->
addAlmostAll (Ant.java) --> setNewProperty (Project.java) -->
setNewProperty (PropertyHelper.java) --> which does NOT set
userProperties.put(...)

so why is it handled differently ? was this intented this way ?

thx
regards,
seb

> 
> btw: i had a short look at the code. in Ant.java i read:
> 
>     private void overrideProperties() throws BuildException {
>         // remove duplicate properties - last property wins
>         // Needed for backward compatibility
>         Set set = new HashSet();
>         for (int i = properties.size() - 1; i >= 0; --i) {
>  
> this behaviour (read the comment) is exactly the opposite of what is
> expected i guess because the general ant behaviour is : first property
> wins 
> ... (just a thought).
> 

(...)
-- 
"Perfection is achieved, not when there is nothing left to add, 
but when there is nothing left to take away."  
--- Antoine de St. Exupery, Wind, Sand, and Stars, 1939 

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


Mime
View raw message