ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject [DISC] passing properties to subbuilds
Date Tue, 12 Jun 2001 15:43:59 GMT
OK, just to get a basis to implement the same feature for Ant1 - we'd
have to sort out details for the non-property data types for Ant2
(i.e. how to define them).

The same rules apply to <ant> and <antcall>.

Conor's approach (as I've understood it):

We add a new attribute explicit to <ant> that defaults to true in Ant2
but false in Ant1 - if this one has been set to true, only those
properties that are set via nested <param> elements will be passed to
the sub build.

All properties that get passed to the sub build override the properties
with the same name in the sub build.

Jose Alberto's approach (as I've understood it):

All properties get passed to the sub build.

All <property> tasks override existing properties unless these come
from command lines or <param> tags nested into <ant> - with one
exception: you can say that you are just giving a default value for a
property that should not be used if that property already exists.

I see a problem with Jose Alberto's approach as it is sure going to
break Ant1 build files that hold multiple definitions of properties
and rely on the fact, that only the first definition will win (Ant's
own build file for example uses a property file to override
build.compiler settings if the user wants to).

I'd prefer to have explicit control over what I'm going to pass down to
the sub build, so I prefer Conor's approach.


View raw message