ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: ant 1.5.4 : Import
Date Mon, 28 Jul 2003 19:15:49 GMT
I would like to summarize a number of ideas I have read concerning import.

1) attributes for the import task itself :

11) file
<import file="a/b/common.xml"/>
===> import relative to the basedir of importing build file

12) href
(Peter Reilly)
<import href="a/b/common.xml"/>
====> import relative to the directory containing the importing build file.

href should also support URLs
But as DD pointed out, this is opening a pandora box.
If imported files are downloaded from an http server or from a jar file,
there will be problems with properties, ...

13) name
(Nicola Ken Barozzi and Dominique Devienne)
<import file="blah.xml" name="blah"/>
Give a name to the imported project
Useful to solve conflicts (see point 2)

2) several components should be able to import the same build file
(Alexey Solofnenko)
import projb.xml
import projc.xml

projb.xml and projc.xml must be allowed to import both common.xml for

ProjectHelper2 is complaining about such situations currently

3) new attributes for project
there is a suggestion by Nicola Ken Barozzi to add
importable with the values true (meaning that the file can be imported) or
false(never imported).
if it is not mentioned then it is possible to import the build file with a

4) importable or fragment
Conor and others suggest a new top-level tag called
<importable> for files which are only meant to be imported
It sounds good, the only problem is that IDEs providing support to write ant
build files will not support creating these files immediately. The IDEs will
certainly catch up with that, but if we do this, in the first months build
file writers will need to write the files in basic editors

5) debate about what is the basedir of an imported file
can be :
- the basedir of the imported file
- base dir of importing file

I would go for :

- basedir of importing file if the imported file does not have a basedir
- basedir of imported file if the imported file has a basedir

6) magic attributes
there is already
ant.file.[project name] = location of the build file
I think I saw someone asking for another magic attribute, but I cannot
remember which one ...

7) antreturn
this is not directly related, but there is a lot of value in the code
suggested by Dominique Devienne.
I am sure this addresses a need.

Now we need someone (Conor ?) to decide in which order these different
points are going to be added to our code.
(Like what is happening for antlib).



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

View raw message