I have been working on trying to get Checkstyle working in Maven in the Eclipse Indigo IDE for a while. Finally, I thought that I would ask for expert advice on this.
I am using Eclipse Indigo and trying to configure Checkstyle to run in Maven.
Below is a snippet of my pom.xml. Only checkstlye: checkstlye works and generates reports.
======
<profile>
<id>checkstyle-profile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>${basedir}/src/main/resources/maven_checks.xml</configLocation>
</configuration>
<executions>
<execution>
<id>checkstyle-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>compile</phase>
<configuration>
<violationSeverity>error</violationSeverity>
<maxAllowedViolations>7000</maxAllowedViolations>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<configLocation>${basedir}/src/main/resources/maven_checks.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
Some of the things that do not work:
- configLocation for custom checkstlye is ignored and is always used by default to validate Sun.
- checkstlye: check. . , checkstyle: check .
org.apache.maven.plugins: maven-checkstyle-plugin: 2.9.1: check (default-cli) zzz-web: 5950 .
- , Crossess 7000?
- Checkstyle Java . , Java, , Java. , jxr .
.
.