Yes, I tried all the suggested solutions including that one. On a hunch I
went ahead and explicitly set the checkstyle version to 5.5 in the POM and
problem solved. I believe checkstyle 5.5 changed the method signatures on
some of the log methods and that was causing the issue during the report
generation. Here is what worked for me...

<profiles>
        <profile>
            <id>checkstyle</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>2.9.1</version>
                        <dependencies>
                            <dependency>
                                <groupId>com.puppycrawl.tools</groupId>
                                <artifactId>checkstyle</artifactId>
                                <version>5.5</version>
                            </dependency>
                            <dependency>
                                <groupId>...</groupId>
                                <artifactId>...</artifactId>
                                <version>3.0-SNAPSHOT</version>
                                <classifier>build</classifier>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <configLocation>checkstyle.xml</configLocation>
                            <failsOnError>false</failsOnError>

<packageNamesLocation>gov/va/vba/vbms/tools/build/vbms-checkstyle-packages.xml</packageNamesLocation>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
    </profiles>

On Thu, Apr 12, 2012 at 1:50 PM, Wayne Fay <[email protected]> wrote:

> > I have tried all the recommended solutions thus far and none worked. The
> > exception is not coming from Checkstyle, at least not as far as I can
> tell.
> > I debugged the maven plugin (2.9.1) and I am using the latest checkstyle,
> > 5.5. The call to executeReport in AbstractMavenReport is where the error
> is
> > thrown. The actual check process completed. I don't think this is a
> > checkstyle error but I'm not certain yet.
>
> So you tried this? I found this in someone's bugzilla [1] and
> supposedly it fixed their issue.
> <property name="cacheFile" value="target/checkstyle-cachefile"/>
>
> You may also find the m-checkstyle-p code interesting reading [2].
>
> Is there an option to run Checkstyle via Ant? Perhaps call out to
> antrun instead and let it run Checkstyle for you. Or just call
> Checkstyle yourself from the command line with the proper config. At a
> minimum, this would tell you if the problem is in m-checkstyle-p or in
> the way your configuration file is written, so it is a good next step
> IMO.
>
> [1] http://www.smartics.eu/bugzilla/show_bug.cgi?id=468
> [2]
> http://maven.apache.org/plugins/maven-checkstyle-plugin/xref/org/apache/maven/plugin/checkstyle/DefaultCheckstyleExecutor.html#286
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to