Discussion:
Checkstyle configLocation error
jactor
2008-05-06 14:47:42 UTC
Permalink
Hi!

I have configured maven to run a checkstyle when mvn site is used. Here is
the configuration:


<modules>
<module>children.project.jar</module>
...
</modules>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<enableRulesSummary>true</enableRulesSummary>
</configuration>
</plugin>

However, it crashes when I use the config location. I have a main pom
projects which have the checkstyle.xml but it can not be found in the child
projects. Projects like this:

project.main.pom
checkstyle.xml is located in this folder...
children.project.jar
Cobertura: Loaded information on 30 classes.
Cobertura: Saved information on 30 classes.
[INFO] [site:site]
[INFO] Skipped "Maven Surefire Report" report, file "surefire-report.html"
already exists for the English version.
[INFO] Generating "Checkstyle" report.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error rendering Maven report: Unable to find configuration
file location.
Unable to find location 'checkstyle.xml' as URL, File or Resource.
--
View this message in context: http://www.nabble.com/Checkstyle-configLocation-error-tp17084338p17084338.html
Sent from the Maven - Users mailing list archive at Nabble.com.
jactor
2008-05-06 15:00:05 UTC
Permalink
I went playing with my checkstyle configuration and modified the following:

<configLocation>../checkstyle.xml</configLocation>
Post by jactor
<configLocation>checkstyle.xml</configLocation>
I know have a system which runs with the correct checkstyle.xml :-D.

If I want to reuse this checkstyle xml in other projects, can I override the
current setting? I would like other main projects to have this main pom as
parent to enable common configuration.
--
View this message in context: http://www.nabble.com/Checkstyle-configLocation-error-tp17084338p17084717.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Brian E. Fox
2008-05-06 16:27:26 UTC
Permalink
You can see a way to bundle and share the config here:
http://blogs.sonatype.com/brian/2008/04/17/1208485500000.html (at the
end, I specifically talk about the checkstyle use)

-----Original Message-----
From: jactor [mailto:***@hotmail.com]
Sent: Tuesday, May 06, 2008 8:00 AM
To: ***@maven.apache.org
Subject: Re: Checkstyle configLocation error


I went playing with my checkstyle configuration and modified the
following:

<configLocation>../checkstyle.xml</configLocation>
Post by jactor
<configLocation>checkstyle.xml</configLocation>
I know have a system which runs with the correct checkstyle.xml :-D.

If I want to reuse this checkstyle xml in other projects, can I override
the
current setting? I would like other main projects to have this main pom
as
parent to enable common configuration.
--
View this message in context:
http://www.nabble.com/Checkstyle-configLocation-error-tp17084338p1708471
7.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org
Loading...