ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject optional tasks and the ant/lib dir
Date Fri, 15 Jul 2005 03:50:17 GMT

I noticed the thread re junit and ftp tasks recently, and also had to
deal with this myself to use junit task recently.

Has anyone considered making taskdef use a child-first classloader in
order to avoid having to move the relevant task jar out of the ant/lib

It is also possible to write a variant of child-first classloading
which, when requested to load certain classes, gets the .class contents
as a resource from its parent then loads that class itself. Doing this
with all classes in the optional package means that the user doesn't
even need to make sure a copy of the ant optional jar is in the
classpath; they get picked up from the parent classloader & redefined
via the child.

Note that whether a custom classloader for taskdef works depends on how
ant accesses the classes associated with that taskdef; I don't know
whether such a classloader would fit into ant without major surgery.

I do currently use the $HOME/.ant/lib approach and it isn't *bad*.
However it would be nice to use standard ant variables to point to the
optional libs (and set them in or similar).



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

View raw message