Now this has changed for the latest version of CheckStyle, you need to declare the file location using the property:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <properties> <checkstyle.config.location></checkstyle.config.location> </properties> <build> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.9.1</version> </plugin> </plugins> </build> </project>
Taken from my example how to write a custom validation check:
http://blog.blundellapps.co.uk/create-your-own-checkstyle-check/
and the source code is here:
https://github.com/blundell/CreateYourOwnCheckStyleCheck
source share