Maven checkstyle使用错误的样式
我的Maven checkstyle使用错误的样式,maven,checkstyle,Maven,Checkstyle,我的pom.xml中有以下配置: <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.17</version> &
pom.xml
中有以下配置:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<failOnViolation>true</failOnViolation>
<enableFilesSummary>false</enableFilesSummary>
</configuration>
</plugin>
</plugins>
</reporting>
我的POM配置有什么问题
提前谢谢。配置应该在
中,而不是
中:
org.springframework.boot
springbootmaven插件
org.apache.maven.plugins
maven checkstyle插件
2.17
google_checks.xml
UTF-8
真的
真的
验证
验证
检查
mvn checkstyle:check | grep sun
[INFO] There are 913 errors reported by Checkstyle 8.19 with sun_checks.xml ruleset.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>