ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Vacchi <uncommonnonse...@gmail.com>
Subject Re: ClassLoader classpath of a TaskDef'd task
Date Tue, 15 Apr 2014 07:22:40 GMT
Please notice that I am having the problem in *netbeans*! the problem seems
not to be occurring from the CLI


On Tue, Apr 15, 2014 at 9:10 AM, Edoardo Vacchi
<uncommonnonsense@gmail.com>wrote:

> My taskdef'd task uses
>    Thread.currentThread().getContextClassLoader();
> to load dynamically a series of classes *during* the execution of the task
> itself. These classes are actually the same jar of the task implementation.
>
> Now, if I put my jars in ~/.ant/lib the task works. If I use
> <taskdef ...>
>    <classpath>...</classpath>
> </taskdef>
>
> where classpath points to the ./lib/* folder of the project, the task *is*
> found, but the classloader fails to load the classes. I suppose that ant is
> changing the classloader for the task's thread. How can I pass the
> <classpath/> information down to the task's classloader?
>
> thanks
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message