1. 问题现象
编译rocketMq项目的时候报错(其他maven项目类似):
Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (verify) on project rocketmq-remoting: Failed during checkstyle execution
2.解决方案
2.1 执行命令的时候,添加参数
mvn clean install -DskipTests=true -Dcheckstyle.skip=true
2.2 找到pom.xml里面的maven-checkstyle-plugin插件,设置skip属性为true
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>verify</id>
<phase>verify</phase>
<configuration>
<skip>true</skip>
<configLocation>style/rmq_checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>