ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Antlib autoloading
Date Sat, 10 Sep 2005 15:16:16 GMT
On Fri, 9 Sep 2005, Dominique Devienne <> wrote:
> On 9/9/05, Stefan Bodewig <> wrote:
>> > So, any ideas how this could be acomplished?
>> Load all resources from META-INF/antlib.xml at startup and process
>> them, I'd say.
> But doesn't that go against Ant's tradition to not have auto-magic
> things, but instead spell things out explicitly, usually in the
> build file?

Yes, probably.  Even though there is a lot of explicitly invocable
magic that is not visible in the build file either (build.sysclasspath
for example).

> I'd rather we extend <typedef> to accept a <fileset> of AntLib jars
> to load, possibly thru META-INF/antlib.xml, than auto-magically
> loading all possible antlibs visible from the classpath. At least
> you can see it and start looking at the jars it loads.

You can't look at the jars loaded by
xmlns:au="antlib:org.apache.ant.antunit" either.

> How would you know looking at a build file where a task is coming
> from otherwise?

How do you know with a namespace declaration?

> Also, for example, I have quite a few AntLibs which are in ant/lib,
> and thus on Ant's classpath, but I don't use all of them in all my
> builds. They're there because it's our official supercharged
> production Ant distro, but loading all of them in builds that
> require none or just a few is wasteful.

Completely agreed, that's why not enabling autoloading by default is a
good idea.  I personally don't want to autoload all antlibs, in
oarticular not all into the default namespace, myself either.  I just
commented on how it could be done 8-)

> PS: And BTW, Matt's point about conflict resolution is a good one.



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

View raw message