Maven丢失了checkstyle配置
我尝试将customMaven丢失了checkstyle配置,maven,checkstyle,maven-checkstyle-plugin,Maven,Checkstyle,Maven Checkstyle Plugin,我尝试将customcheckstyle.xmlconfig而不是standartsun\u checks.xml连接到 为什么会被忽略,您需要修复它吗?Hello@Pavel尝试在源代码之外使用checkstyle.xml,也可以选择设置目标。它应该能解决你的问题 <properties> <checkstyle.configLocation>src/checkstyle/checkstyle.xml</checkstyle.configLocation&
checkstyle.xml
config而不是standartsun\u checks.xml
连接到
为什么
会被忽略,您需要修复它吗?Hello@Pavel尝试在源代码之外使用checkstyle.xml,也可以选择设置目标。它应该能解决你的问题
<properties>
<checkstyle.configLocation>src/checkstyle/checkstyle.xml</checkstyle.configLocation>
<checkstyle.suppressionsLocation>src/checkstyle/suppressions.xml</checkstyle.suppressionsLocation>
</properties>
src/checkstyle/checkstyle.xml
src/checkstyle/suppressions.xml
org.apache.maven.plugins
maven checkstyle插件
${checkstyle.version}
${checkstyle.configLocation}
${checkstyle.suppressionsLocation}
src/main/java
src/test/java
检查
解决方案正在使用config location参数启动maven任务:
mvn checkstyle:check -Dcheckstyle.config.location=checkstyle.xml
也许我做错了什么,但结果是一样的。日志
<properties>
<checkstyle.configLocation>src/checkstyle/checkstyle.xml</checkstyle.configLocation>
<checkstyle.suppressionsLocation>src/checkstyle/suppressions.xml</checkstyle.suppressionsLocation>
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<!-- for java
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.26</version>
</dependency>
</dependencies>
-->
<configuration>
<configLocation>${checkstyle.configLocation}</configLocation>
<suppressionsLocation>${checkstyle.suppressionsLocation}</suppressionsLocation>
<sourceDirectories>
<sourceDirectory>src/main/java</sourceDirectory>
<sourceDirectory>src/test/java</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
mvn checkstyle:check -Dcheckstyle.config.location=checkstyle.xml