ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Should <import> cause an error when used inside a <target>?
Date Wed, 17 Sep 2003 11:17:01 GMT
On Wed, 17 Sep 2003, peter reilly <> wrote:

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


> This statement is not in the manual.

Let's fix it ;-)

> The code does not check the precondition.

Maybe it should?

> so it could be said that the top-level tasks (including import) do
> not get evaluated at parser time.

OK, if I nest <import> into a target, something like

<target name="define-paths" depends="detect-platform">
  <import file="${platform.specific.paths}"/>

and this would import a file that had only <path> definitions - the
definitions are platform specific - will it work as expected?

With "expected" I mean it would include the <path> defitions for my
platform (based on a property set by a task in target
detect-platform).  And certainly make those <path>s usable for
subsequent targets.


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

View raw message