ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <tim.gor...@allustra.com>
Subject RE: Usage of import
Date Wed, 04 Jun 2003 12:31:15 GMT
Right. Well, let's see how far we get on this list, as I'm keen to avoid
cross-posting...

To be fair, the import task is heavily flagged as experimental and may not
even make it into 1.6, which would be a great shame.

Having done a fair bit with multi-project builds in the last couple of years
using ANT, the lack of direct support for multiple projects makes resorting
to heavy use of the ant task. ANT's heavy leaning towards being a
declarative build system is somewhat violated by usage of the ant task, as a
lot of the features that are declarative can no longer be used (specifically
resolving dependencies).

I like the depends checking against targets in imported ANT files! It's
great.

I don't like:

If we're using the import task to express the dependency of one project on
another then you'd expect targets in the depended-on project to behave as if
they'd been invoked directly on that project - import doesn't allow for this
because relative paths seem to evaluated relative to the importing file.

If multiple imports ulitmately imply the import of another project twice
then why the warning? It's definitely going to happen in the future and it
ought not to be a problem - graphs of dependencies are what it's all about
here, after all.

It's not clear how name conflicts are handled, it would be useful to
optionally specify some kind of namespace for the imported project so that
tasks in the imported file were all prefixed with something.

Suggestions
- Maybe have a pathsrelativeto=importer|imported directive on the import -
this gives you the option to either
 - inline another build.xml in place of the import, so that relative paths
are resolved with respect to the importing ant file's basedir (more of a
include, than an import)
 - Simply state that you depend on a project defined elsewhere and that
target invoked in the imported file will behave as if you were using that
file directly.

BTW, I know this could be asking a lot.

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: 04 June 2003 12:12
To: user@ant.apache.org
Subject: AW: Usage of import


> I've had a crack at using the 'import' task in 1.6alpha - has someone
> already set the ball rolling regarding discussion of this?

There were some discussion ... but I don´t know on which of these two lists
and when ...

> Is discussion of this sort of thing reserved for the developers until
> it goes final?

I don´t think so. Curiously users are the best testers :-)


Jan


Mime
View raw message