ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: import task and the file attribute
Date Thu, 12 Feb 2004 10:49:30 GMT
On Wed, 11 Feb 2004, Mariano Benitez <mariano@fuegolabs.com> wrote:

> Why the file attribute of the import task is not considering files
> relative to the basedir?

This is because you may use <import> in a file that itself gets
<import>ed and then basedir would be that of the outer-most project
and not the one of the file you are looking at.

See this note from the manual

,----
| Important: We have not finalized how relative file references will be
| resolved in deep/complex build hierarchies -such as what happens when
| an imported file imports another file. Use absolute references for
| enhanced build file stability, especially in the imported files.
`----

which is no longer completely true since we are bound by backwards
compatibility after we've released 1.6.

use <import file="${ant.file.pepe}/../include.xml"/>

instead of

> <project name="pepe" basedir="..">
>     <import file="include.xml"/>

Stefan

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


Mime
View raw message