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: Should <import> cause an error when used inside a <target>?
Date Wed, 17 Sep 2003 12:17:55 GMT
On Wednesday 17 September 2003 13:06, Stefan Bodewig wrote:
> On Wed, 17 Sep 2003, peter reilly <peter.reilly@corvil.com> wrote:
> > On Wednesday 17 September 2003 12:17, Stefan Bodewig wrote:
> >> 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?
> >
> > using <import> within a target does not work as the code
> > that was placed in to handle top-level tasks/types does
> > not work in this case (it assumes the pre-condition).
>
> OK, this is an issue with the current implementation.
>
> Shall we make this ("Thou Shalt Not Use <import> Inside <target>s") a
> rule for <import> in general and enforce it?  Or is my use-case above
> a valid one and we change the implementation to deal with it?
>
> Note that I'm not sure how I'd answer that myself. 8-)

I think that the use-case is valid.

One should also think about an <import> inside a sequential.

The implementation I used to handle top-level tasks most likely needs to
be changed.

Peter


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


Mime
View raw message