You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Xavier Outhier <xa...@siemens.com> on 2006/10/25 13:25:32 UTC
[m2] Unable to change Checkstyle configuration file: path problem
Hi all,
I'm using the Checkstyle plug-in and it works perfect with default
or predefined.
1) But I would like to try another config file from JJGuidelines.
I try to change to checkstyle-jjguidelines.xml by modifying the pom like
this:
<reporting>
<plugins>
[...]
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>checkstyle-jjguidelines.xml</configLocation>
</configuration>
</plugin>
[...]
</plugins>
</reporting>'ve added the checkstyle-jjguidelines.xml in
I put the checkstyle-jjguidelines.xml and checkstyle-jjguidelines.jar
in my project directory and it found it but I got the error:
[INFO] Generate "Checkstyle" report.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error during page generation
Embedded error: Error rendering Maven report: Failed during checkstyle
configuration
Unable to instantiate usage.UnusedLocalVariableCheck
[INFO]
------------------------------------------------------------------------
I suppose it comes from that:
"within the compile scope of the dependencies or build extensions
classpath."
There is a class with name "UnusedLocalVariableCheck" in the jar.
Where should I put the checkstyle-jjguidelines.jar?
What should I add in my pom.xml or settings.xml?
2) I would like also to know where are located the 4 predefined config
file listed
on the Customization page:
http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
Thank you,
Xavier.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Unable to change Checkstyle configuration file: path problem
Posted by Dennis Lundberg <de...@apache.org>.
Xavier Outhier wrote:
> Hi all,
>
> I'm using the Checkstyle plug-in and it works perfect with default
> or predefined.
>
> 1) But I would like to try another config file from JJGuidelines.
> I try to change to checkstyle-jjguidelines.xml by modifying the pom like
> this:
>
> <reporting>
> <plugins>
> [...]
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <configuration>
> <configLocation>checkstyle-jjguidelines.xml</configLocation>
> </configuration>
> </plugin>
> [...]
> </plugins>
> </reporting>'ve added the checkstyle-jjguidelines.xml in
>
> I put the checkstyle-jjguidelines.xml and checkstyle-jjguidelines.jar
> in my project directory and it found it but I got the error:
>
> [INFO] Generate "Checkstyle" report.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error during page generation
> Embedded error: Error rendering Maven report: Failed during checkstyle
> configuration
> Unable to instantiate usage.UnusedLocalVariableCheck
> [INFO]
> ------------------------------------------------------------------------
>
> I suppose it comes from that:
> "within the compile scope of the dependencies or build extensions
> classpath."
> There is a class with name "UnusedLocalVariableCheck" in the jar.
>
> Where should I put the checkstyle-jjguidelines.jar?
> What should I add in my pom.xml or settings.xml?
Have a look at the bottom of this page for instructions on how to use
custom checks:
http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
You might also want to make sure that the configuration you are using is
for the same version of Checkstyle that the maven-checkstyle-plugin
uses, which is 4.1. A couple of checks was dropped in Checkstyle 4.0.
> 2) I would like also to know where are located the 4 predefined config
> file listed
> on the Customization page:
> http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
These are put into the maven-checkstyle-plugin.jar file as resources in
the config folder.
>
> Thank you,
>
> Xavier.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org