ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg K Strong <cstr...@arielpartners.com>
Subject [PROPOSAL] new propertyprecedence attribute for <ant> task
Date Tue, 12 Jun 2001 05:18:41 GMT
One of the features of ant former make mavens may stumble over is the 
fact that
 the properties of a parent project override those of a subproject 
invoked via the <ant> task.
[Yes, I confess it has tripped me up a few times :-]

However, sooner or later one recognizes the wisdom of this choice-- What 
happens
when you download some open-source package with its own build file but 
want to
change some of its properties.  For example, perhaps you need to change 
the output directory
or turn on debugging.   Because we want "pristine sources" (a la Maximum 
RPM) we do NOT
want to start hacking someone else's build file.  Instead, we externally 
specify our preferred property
settings either on the command line (via -D) or using a simple "wrapper" 
buildfile.

So far, so good-- but what about those times that you really WANT the 
subproject to override
the property settings of the parent?   For example, one might set some 
defaults in a top level
build file and then call multiple subproject buildfiles and override 
property settings when necessary.  
Is there a way to support this behavior and still keep analyzability, 
parallelizability, and all the other "-ilities"?

I believe so.  I am proposing adding a new attribute to the ant task 
where you would specify that
all properties in the subproject should override those of the parent.   
 One possible name is
"propertyprecedence," although I am looking for a better one!  It could 
take the values of
"parent" and "child," and default to "parent" for example.

I hope I stated the problem clearly enough.  Do others agree with the 
need for this capability?
If so, what are some alternative designs?

Thanks in advance,

--Craeg

-- 
Craeg K. Strong                               | www.arielpartners.com
Ariel Partners LLC		              | cstrong@arielpartners.com 
85 River Street, Ste. 3A                      | Fax:      (781) 647-9690
Waltham, MA 02453                             | Voice:    (781) 647-2425



Mime
View raw message