ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: override
Date Mon, 04 Aug 2003 10:45:00 GMT
> From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> 
> On Fri, 1 Aug 2003 10:47 pm, Nicola Ken Barozzi wrote:
> > How can this thing be done while shielding interactions?
> >
> 
> You make the renaming optional. 
> 
> <import file="a.xml"/>
> <import file="b.xml"/>
> 
> All of a's and b's targets go unprefixed. If those builds use 
> targets which 
> are provided by the main build, or by the other, unprefixed, 
> import then 
> there is no problem. This situation thus allows the 
> cross-interactions. We 
> need to decide a few issues. Is mutliple definitions of a 
> target considered 
> an error or does one definition win. If one wins, which one - 
> the first or 
> the last. I prefer to have this as an error.
> 
> <import file="a.xml" prefix="a"/>
> <import file="b.xml" prefix="b"/>
> 
> In this case each import's targets are prefixed and thus will 
> not collide. 
> Specific overriding in the build could make desired connections.
> 
> <override target="a.init">
> 	<antcall target="b.init"/>
> </override>
> 

So, what happens if a.xml <import/>s X.xml which relies on targets
defined in a.xml? Does usages in X on the target "compile" defined in
a.xml will still be available when a.xml is prefixed?

Will prefixes be cascading? What happens b.xml imports another file
Z.xml prefixing it with "a" (or "b" for that matter). How will be all these
prefixes resolved when combined? Notice that a user of a.xml has no
idea how the file was written or whether it performs more imports inside or what.

If we want to do these things we should use execution contexts to resolve
things properly and not rely on rewriting. For every target you have a
context and you resolve the depends relative to the context and so on.

Jose Alberto

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


Mime
View raw message