I have a plugin that I'm writing that needs to do two things during the
course of its execution:
Load a resource from the current project's classpath
Load a resource from its own guts

This is a fallback kind of thing: if the plugin can't find anything
appropriate on the project classpath, then and only then do I want it to
examine its own .jar file for the resource in question.

My hunch is that there are probably already two classloaders set up for
just this purpose.

I am guessing (haven't tried yet) that the project classpath is probably
visible to Thread.currentThread().getContextClassLoader().  Is that right?

I'm also guessing (haven't tried yet) that from within my mojo
this.getClass().getClassLoader() will return me a ClassLoader that is set
up to be able to see my mojo's innards.  Is that right?

Best,
Laird

-- 
http://about.me/lairdnelson

Reply via email to