ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Reich" <>
Subject Re: [PATCH] Lazy task class loading
Date Tue, 07 Aug 2001 16:43:21 GMT

> OK, I'll admit that your reminder triggers this response (I shouldn't
> be sitting here on front of the screen anyway, but that's a different
> story).

No problem, sometimes we all need two or more kicks until we do something

> I like the changes to Project, but the way you've implemented the Ant
> task, it will only pass on the class names of already loaded tasks,
> not the actual classes - this not only means you'll have to load them
> once again in the subbuild if you need the same task, but also that
> any custom classloader a user may have specified in <taskdef> will be
> lost.
> As a result, tasks that used to work in the main build may throw a
> ClassNotFoundException in the subbuild - or even worse be a different
> implementation of the same class.

I have to admit I'm not entirely firm with how Ant uses classloaders. Will
the subbuild always have a different classloader? Won't it have the outer
classloader as a parent and automatically inherit all classes loaded by the

Either way, it seems to me this problem will be solved if I just pass the
contents of the TaskDefinitionHashtable as-is. Strings as Strings, Classes
as Classes.

If I'm wrong here, please stop me - otherwise, I'll make that change and
submit a new patch.

> And then you want to apply the same logic to data types as well 8-)

Data types...?

> Stefan

-Stefan (hehe, if this conversation goes on people will be really confused
about who said what)

View raw message