ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
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 <peter.reilly@corvil.com> wrote:

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

OK.

> 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}"/>
</target>

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.

Stefan

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


Mime
View raw message