ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: ant 1.5.4 : Import
Date Thu, 24 Jul 2003 14:49:14 GMT
On Thu, 2003-07-24 at 13:49, Conor MacNeill wrote:
> On Thu, 24 Jul 2003 10:26 pm, Nicola Ken Barozzi wrote:
> >
> > What about:
> >
> >   <import file="blah.xml" name="blah"/>
> 
> Sure - pretty much what I thought, maybe a more descriptive attribute name 
> (overrideprefix). It would default to the imported project name.
> 
> >
> > So IIUC it's really only about making the import task resolve files
> > relative to the basedir of the project that imports, as you say above.
> >
> 
> Yes. This is how Ant works for other tasks so it should work that way for 
> import too. The resolution does have to be done in Import itself using a 
> String argument since the default File argument would be resolved by Ant to 
> the outermost project's basedir which would be wrong.

Just to be sure I understand ...
Assuming the following:
    A.xml imports B.xml which imports C.xml.

B has an import
<import file="C.xml"/>

Are saying that A.xml is the outermost project and B.xml is the current
project ?

If so this is not the way import works, there is only one project. (As
against <ant> and <antcall> et al, where there is a new sub-project).

In the current code, if B.xml has a basedir attribute for the project
element, the attribute is ignored (Not good).

So the question is what should B's import be relative to:

  1) A.xml's basedir
  2) B.xml
  3) B.xml's currently ignored basedir attribute.

I think that the consensus is 3).

Peter



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


Mime
View raw message