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: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs AntLikeTasksAtTopLevelTest.java
Date Wed, 03 Sep 2003 11:11:48 GMT
Import checks if the file has already been
imported:
So importing the current build file would import it
once.

The following import.xml:

<project>
  <echo>Hello World</echo>
  <import file="import.xml"/>
</project>

Using ant -f import.xml prints out "Hello World" twice.

Note that one can still cause infinite loops with
antcall:

<project default="x">
  <target name="x">
    <antcall target="y"/>
  </target>

  <target name="y">
    <antcall target="x"/>
  </target>
</project>

Peter

On Wednesday 03 September 2003 11:42, Stefan Bodewig wrote:
> On 3 Sep 2003, <bodewig@apache.org> wrote:
> >   Throw an exception instead of looping forever in top-level <*ant*>
> >   task.
>
> does <import> need the same treatment?  What happens if a build file
> tries to import itself?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org


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


Mime
View raw message