Hello,
I wonder if you try to declare checktyle plugin too  in build/plugins
section with your dependency.
That should works for maven3

2011/11/15 Nate Stoddard <[email protected]>:
> I'm resending this because the formatting got butchered the first type.
> Sorry for the duplicate.
>
> Nate Stoddard
>
> =====
>
> 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:
>
>    <build>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-site-plugin</artifactId>
>                <version>3.0-beta-3</version>
>                <dependencies>
>                    <dependency>
>                        <groupId>[deleted]</groupId>
>                        <artifactId>checkstyle</artifactId>
>                        <version>${project.version}</version>
>                    </dependency>
>                </dependencies>
>                <configuration>
>                    <reportPlugins>
>                        <plugin>
>                            <groupId>org.apache.maven.plugins</groupId>
>                            <artifactId>maven-checkstyle-plugin</artifactId>
>                            <version>2.8</version>
>                            <configuration>
>
>  <configLocation>[deleted]/checkstyle.xml</configLocation>
>                            </configuration>
>                        </plugin>
>                    </reportPlugins>
>                </configuration>
>            </plugin>
>        </plugins>
>    </build>
>
> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to