ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [DISC] passing properties to subbuilds
Date Wed, 13 Jun 2001 09:58:19 GMT
Jose Alberto Fernandez <j_a_fernandez@yahoo.com> wrote:

>> From: Stefan Bodewig [mailto:bodewig@apache.org]
>>
>> 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>

> This is not exactly what I had in mind. <property> only overrides
> those properties that were not defined locally.

OK, I see.

> Remember I one big supported of inmutability :-).

I know, I was sure I must have been wrong 8-).

>> 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.
> 
> Until we have preferences, people want to have some properties that
> they do not really want to manage explicitly all over the build but
> they want to be able to modify and to get global effect.

But we will have preferences in Ant2.  I'd still prefer to make this
explicit, even if it may be (a little?) inconvenient - you can always
say explicit="false" if you don't want to override anything in the
sub build.

And maybe grouping properties to sets would make this even less
inconvenient.

> With my approach, each build file would have something like:
> 
> 	<property name="debug" default="debug" />
> 	<property name="debug" value="false"/>

If at all, I'd merge them, something like

 	<property name="debug" default="false" />

If the caller passes in a property named debug it will take
precedence, otherwise we use the given default value.

Stefan

Mime
View raw message