On Wed, 17 Sep 2003 07:51 pm, Stefan Bodewig wrote:
> On Mon, 15 Sep 2003, peter reilly <[EMAIL PROTECTED]> wrote:
> >> In particular, I'm not too fond of the completely undocumented
> >> <classloader> task.
> >
> > It would be nice to get this fixed.
>
> I rather opposed to the idea of adding stuff to a class loader that
> has been used before - especially for the system classloader.  I'm not
> sure whether there is something that could be fixed.
>
> <classloader> gets you into a position where you load the same class
> twice.
>
> <taskdef resource="...">
>   <classpath>
>     <pathelement location="my-tasks.jar"/>
>   </classpath>
> </taskdef>
>
> and later you go and add my-tasks.jar to the system class loader via
> <classloader>.   Suddenly the class is available in the same
> classloader twice (the one that loaded the tasks in <taskdef>) and
> some of them have already been loaded - and not from the system
> classloader that will be used in subsequent attempts.
>
> I'd rather stay away from this completely.
>

Since Costin has not chimed in, it is worth reading this message and Costin's 
followup

http://marc.theaimsgroup.com/?l=ant-dev&m=104080215031773&w=2

In general, I'm not very comfortable with the <classloader> task as it can 
cause untold havoc and subtle errors. Costin's counterpoint is that it is 
perhaps useful for advanced users  - this may have merit.

Conor


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

Reply via email to