I'm trying to use the new Maven 3 style of generating reports, but
I'm having problems with one in particular. I have some custom
Checkstyle checks, but I'm not able to add the dependency in the right
spot to make everything work. Here's part of my POM:
org.apache.maven.plugins
maven-site-plugin
3.0-beta-3
[deleted]
checkstyle
${project.version}
org.apache.maven.plugins
maven-checkstyle-plugin
2.8
[deleted]/checkstyle.xml
In previous
versions of Maven, I could add dependencies to the actual report plugin,
but not anymore. Adding the dependency to the maven-site-plugin doesn't
work since it's added to the wrong level of the classloader. In this
case two classloaders are created: 1) maven-site-plugin, which is the
parent classloader of 2) maven-checkstyle-plugin. The Checkstyle JAR is
added to (2), so by adding my dependency to the the maven-site-plugin
(1) things won't work because it can't reference the Checkstyle types in
(2). Adding the Checkstyle JAR as an additional dependency doesn't work
either since the types from different classloaders are incompatible.
There's no way of adding the dependency such that it ends up in (2).
I've tried configuring the plugin under the pluginManagement section
also, but that seems to be ignored for the newest style.
I'm just
wondering if this is even possible, or if I need to roll back my
reporting configurations to the older style until the newer one is fixed
up and functioning better.
Nate Stoddard