velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <>
Subject Re: Unable to locate .VM files in Jar (Velocity 1.3.1)
Date Fri, 31 Oct 2003 16:32:37 GMT

On Friday, October 31, 2003, at 09:44 AM, Geir Magnusson Jr. wrote:
> Hoo boy.  Here's the beef.  Ant doesn't set the context classloader
> so Thread.currentThread().getContextClassloader()
> return the primordial classloader, which of course, doesn't have the 
> classpath that you set in the ant build script.  I you use the 
> canonical
> this.getClass().getClassloader()
> you get the ant classloader, which has your classpath.
> I'm asking the ant crew about what to do.

I talked to the ant team, and this is fixed in ant 1.6.  What this 
means is

a) if we make this change, we need to use ant 1.6 to test with and we 
run a significant risk of breaking other things where [strange, IMO] 
things are done with the classloader.  I don't like either of those.  I 
was darn happy w/ ant 1.4, and we don't want to break things.


b) We add a new class, ContextClasspathResourceLoader

As much as I *hate* adding a new loader, it's the only way I can 
imagine that we do this w/o breaking someone, and quite frankly, 
classloader bugs are amazingly hard to track down sometimes..


Geir Magnusson Jr                                   203-247-1713(m)

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

View raw message