ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Chalko <n...@chalko.com>
Subject Re: Using classloader for Junit
Date Thu, 19 Jun 2003 15:40:35 GMT
Conor MacNeill wrote:

>On Fri, 20 Jun 2003 12:17 am, Nick Chalko wrote:
>  
>
>>    
>>
>
>I'll be interested to see if this works :-) I have my doubts. As soon as you 
>go into the main loader to find the task classes 
>(org.apache.tools.ant.taskdefs.optional.junit.JUnitTask), you won't be able 
>to see the Junit classes from the child loader. If you play class loader 
>games to avoid this then you are headed for LinkageErrors. Forking is almost 
>always more preferable.
>  
>
The
if (resourceName.startsWith("org.apache.tools.ant.taskdefs.optional.")) 
{return useParentFirst;}
HACK worked last night.

I will try something a little cleaner tonight.

>BTW, I don;t really agree with the <classloader> task being used to modify the 
>effective classpath of running ClassLoaders. I'm sure this will cause trouble 
>too.
>  
>
Seems to break some of the "properties are  immutable" philosophy of ant.

-- 
Nick Chalko                                         Show me the code.
                          Centipede
  Ant + autodownloadable build plugins + needed jars autodownload.
              http://krysalis.org/centipede
---------------------------------------------------------------------


Mime
View raw message