ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Chalko <>
Subject Re: Using classloader for Junit
Date Fri, 20 Jun 2003 03:40:06 GMT
>It might appear to work but can fail in subtle ways. I have had instances 
>where the second invocation of a task would cause an error because it would 
>bring classes into the VM which were there already leading to two different 
>class instances with the same classname being reachable (loader constraint 
>This can be quite non-deterministic. If I installed a delay, the first load of 
>classes would be GC'd avoiding the constaint violation by the second 
>instance. So, I urge caution :-)

Unless I do this I see only two choices

   1. put Junit.jar and every other dep.jar  in the ${ant.home}/lib
   2. remove ant-junit.jar  and other optional from ${ant.home}/lib

I hate 1 and I don't wan't to insist users change there ant environment 
unless I have to.

I'll see what happens when I try tonight.


View raw message