ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: circular <import>s
Date Wed, 17 Sep 2003 13:07:58 GMT
On Wednesday 17 September 2003 14:00, Nicola Ken Barozzi wrote:
> Stefan Bodewig wrote:
> > On Wed, 17 Sep 2003, Nicola Ken Barozzi <> wrote:
> >>Stefan Bodewig wrote:
> >>>I feel this is wrong for two reasons:
> >>>(1) The current build file (the one intially loaded) should be
> >>>added to the list of already imported files implicitly so it
> >>>doesn't get loaded twice at all.
> >>>
> >>>(2) circular imports look like a bug to me - the build should fail.
> >>
> >>This is the only possible issue. The decision on this point will
> >>automatically define number 1.
> >
> > I'm not sure.  Even if you think the current "flat" import rules are
> > correct, (1) should be addressed IMHO.
> Wait, you said that it prints out:
> "Skipped already imported file build.xml"
> This means that the current file is *not* imported twice... how do you
> gather that it executes the import once?

It executes the build.xml as a normal ant file and then build.xml
as an imported ant file.
The effect is that top-level tasks in the build.xml are executed twice.


> >>So the current behaviour is correct given the actual -flat- import
> >>rules.
> >
> > I see and understand that - I just question that rule.  If A imports B
> > and B imports A, I do consider it a bug in the build file.
> It is not. It means that both need each other, not "call" each other,
> there is no recursion.
> If I import class A from B, and B from A, Java will correctly compile
> the code, it already takes care of it too.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message