Quick updates:

1) It's definitely the classloader.   If a set the contextClassLoader to 
the classloader of the plugin, the RM works fine.  That seems like less of 
a hack so I'll go with that.

2) I THINK this is the cause of MCHECKSTYLE-65.   I'll try the classloader 
thing there too.


Dan



On Monday 12 March 2007 10:57, Daniel Kulp wrote:
> Jason,
>
> Back in December, you changed a bunch of plugins (PMD and Checkstyle are
> definitely two of them) to use the ResourceManager instead of the custom
> Locator code they had.
>
> That seems to work fine when the plugins are part of the actual build
> build, but not during a reporting run.    If there are config files that
> are part of a dependency jar (obviously configured in pluginManagement
> section due to reporting section not having dependencies), during a
> regular build, the call to rm.getResourceAsFile(....) passing a
> "classpath relative" string works perfectly.
>
> However, during a "mvn site" run, that ends up throwing an exception as
> the resource cannot be found.    For PMD, I explicitly catch the
> exception and then call
> "this.getClass().getClassLoader().getResource(....)" which DOES work. 
> Thus, I know the plugin itself is picking up the dependencies correctly.
>   It's just the ResourceManager that is not configured completely
> correctly.
>
> Any ideas?   Is the thread contextClassloader not being set properly
> during reporting?

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to