ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Should <import> cause an error when used inside a <target>?
Date Wed, 17 Sep 2003 10:57:22 GMT
On Wednesday 17 September 2003 11:02, Stefan Bodewig wrote:
> or at least a warning?
> If you nest <import> into a target, it won't be evaluated at parser
> time (or will it?) and thus not work as expected - even if the
> resulting build file was valid (i.e. the imported file doesn't contain
> targets).

The javadoc on the import task says that <import> should only
be used at the top-level.

This statement is not in the manual.

The code does not check the precondition.

The toplevel tasks get executed in PH2#parse(Project project, Object source)
but only after the full source/file has been parsed in
 PH2#parse(Project project, Object source, RootHandler handler),
so it could be said that the top-level tasks (including import)
do not get evaluated at parser time.


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

View raw message