ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: Scope of Types
Date Fri, 01 Jun 2001 12:46:06 GMT
From: "Conor MacNeill" <>
> Anyway, some further thought is required on this in relation to <antcall>

OK, here is some further thought. It is somewhat conditioned by what I have
done in mutant.

Lets say we have this projectref structure

// project A

// project B
   <projectref location="A.ant" name="A"/>

//project C
   <projectref location="B.ant" name="B"/>

In mutant, there will be three, linked execution frames - one for C, one
for B and one for A. Each execution frame has its own copies of data
values, task definitions, etc. There are two issues I want to talk about -
one if property scoping and the other is antcall.

Lets say, project A defines a property
    <property name="build.dir" value="BuildAreaA"/>

I believe B, as the referring project, should be able to override this. I
had envisaged this as
    <property name="A:build.dir" value="BuildAreaB"/>

But that implies that properties (and other data values) are somehow
mutable. I have thought about a precedence model for this, where an
referring project has higher priority than the referred project. This would
give a precedence like this
Commandline -> Project C -> Project B -> project A

This gives some controlled mutability but I'm not sure about it - seems
complex to maintain the precedence of each data value.

I think Jose Alberto will suggest that we supply the overriding properties
as part of the <projectref>, like this.
   <projectref location="A.ant" name="A">
       <param name="build.dir" value="BuildAreaB">

Hmm, I have approached projectref as a parse time operation where the
project hierarchy is built up in the project model and not an execution
time operation. I guess I can still accommodate that at parse time. I
wonder when the values would be set. In mutant, before any targets are
evaluated all the non-target tasks are executed as part of an
initialization phase - primarily to set up data values. Once this
initialization is finished, the referring project's overrides could be


I'll deal with the antcall stuff in another email.


View raw message