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: [Bug 28444] - Import: Target Handling Bug
Date Fri, 13 May 2005 10:55:08 GMT
> From: Phil Weighill Smith [mailto:phil.weighill-smith@volantis.com] 
> 
> On Fri, 2005-05-13 at 11:38 +0100, Jose Alberto Fernandez wrote:
> > I would advocate to allow the importer the specify the 
> aliasing name 
> > it wants to use for the imported things, so one has something like:
> > 
> > foo.xml
> > <project name="foo1">
> >   <target name="compile">...</target>
> > </project>
> > 
> > bar.xml
> > <project name="bar1">
> >   <import file="foo.xml" as="imp1"/>
> >   <target name="barcompile" depends="imp1.compile">...</target>
> > </project>
> 
> +1 to the 'as="<name>"'.
> 
> Would we still be able to reference "imp1.compile" as just 
> "compile" if the target has not been overridden in the 
> importing build script: I think this is very important to maintain.

Yes, you would have a "compile" target which is the realization of the
inheritance:

 <target name="compile" depends="imp1.compile"/>

Or something like that, the question is what you get if there are
ambiguities due to multiple imports (you may get just the first one, or
an error)
unless you override and specify what you want them to do.

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