After default config, maven is only outputting the Checkstyle report for source classes, not Junit test classes. Note I'm not looking for the surefire test report output.
from pom.xml:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<configLocation>src/main/resources/apcheckstyle.xml</configLocation>
<module name="LineLength">
<property name="max" value="120"/>
</module>
</configuration>
</plugin>
</plugins>
I changed dependency scope for junit from test to compile:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
Maven is configured to generate the checkstyle reports using the mvn site plugin. I tried adding a user property includeTestResources as true, but this did not help. The documentation states that the default value is true, so I took it out.
Here is the maven output during checkstyle generation.
from javadocs:
Generating C:\Users\Administrator\Projects\lht657aws\target\site\testapidocs\help-doc.html...
checkstyle plugin runs:
[INFO] Generating "Checkstyle" report --- maven-checkstyle-plugin:2.17
[INFO] There are 210 errors reported by Checkstyle 6.11.2 with src/main/resources/apcheckstyle.xml ruleset.
is following the problem-? all the java under src is getting processed, just java under test is being skipped:
[WARNING] Unable to locate Source XRef to link to - DISABLED
after checkstyle, maven project info report starts
[INFO] Generating "Dependencies" report --- maven-project-info-reports-plugin:2.9