Stefan Bodewig wrote:

> On Wed, 22 Jan 2003, Costin Manolache <[EMAIL PROTECTED]> wrote:
> 
>> There are 2 intuitive behaviors:
>> - resolve a relative path based on the file where it was included
>> - resolve it based on some base dir ( like PWD on unix ).
>> 
>> Since most ant files are currently using the build file as base - I
>> think that must be the default, with explicit overrides permitted.
> 
> I'm not sure I understand what you mean.
> 
> All ant files use the build-file's basedir as base 8-) - if they don't
> specify a basedir attribute, this is implicitly set to the directory
> the build file is located in.  So to avoid confusion, the basedir
> attribute, if present, should be taken into account.

I know. That's the current behavior, and it needs to be supported:
- an explicit basedir in import
- the basedir attribute of <project>
- the location of the imported build file ).

What I'm trying to say is that "intuitive" ( IMHO ) is one of the 2 - 
relative to the location of the file where the relative path is found,
or relative to some global basedir. 

Pre-import, all relative locations where based on the location of the
file where they were used ( unless overriden by an explicit basedir )

If the default will be "single basedir ( of the importing file )" - then
we need a way to override this for older files. 
If the default will be "base on the basedir/location of the imported file" - 
then it is very easy to override with a basedir in import.

<import file="foo/bar.xml" basedir="foo" > will be used in the 
default is "importing file basedir", if we want to use bar.xml location

<import file="foo/bar.xml" basedir="${basedir}" > will be used if the 
default is "use imported file basedir" and we want to use change to use the 
importing basedir.

Or better <import file=.. useBaseDir="child|parent" />.

Costin




 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to