I am trying to use checkstyles google_checks.xml with maven-checkstyle-plugin . If I use google_checks.xml with the latest intelliJ checkstyle plugin, everything is correct, but when I try to configure it through the maven-checkstyle plugin, I get this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.13:check (default-cli) on project XX_XX_XX: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate AvoidEscapedUnicodeCharacters: Unable to instantiate AvoidEscapedUnicodeCharactersCheck
My pom.xml looks like this:
<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.file.path>develop/checkstyle/google_checks.xml</checkstyle.file.path> </properties> [...] <build> <plugins> [...] <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.13</version> <configuration> <configLocation>${checkstyle.file.path}</configLocation> <failOnViolation>false</failOnViolation> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.9.1</version> <configuration> <configLocation>${checkstyle.file.path}</configLocation> <failOnViolation>false</failOnViolation> </configuration> </plugin> </plugins> </reporting>
Do you have any suggestions on what might be wrong?
source share