I have a Maven 2 project and I want to configure my Checkstyle report plugin so that only some of my classes are analysed. I have found the maven.checkstyle.excludes<
The answers above didn't work for me as I'm running code generation in maven which also adds the target/generated as a source dir.
The following solution works: You have to use an explicit checkstyle-suppressions.xml config file and activate it from your configuration:
org.apache.maven.plugins
maven-checkstyle-plugin
3.1.1
checkstyle.xml
checkstyle-suppressions.xml
[...]
The suppressions file for excluding the target folder looks like this: