所有子模块都要执行的checkstyle检查

 1 <!--                所有子模块都要执行的checkstyle检查 -->
 2                 <plugin>
 3                     <groupId>org.apache.maven.plugins</groupId>
 4 <!--            运行checkstyle检查        mvn checkstyle:checkstyle-->
 5                     <artifactId>maven-checkstyle-plugin</artifactId>
 6                     <version>2.17</version>
 7                     <configuration>
 8                         <configLocation>checkstyle.xml</configLocation>
 9                         <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
10                         <!--
11                            <configLocation>/google_checks.xml</configLocation>
12                          -->
13                         <failOnViolation>true</failOnViolation>
14                         <consoleOutput>true</consoleOutput>
15                     </configuration>
16                     <executions>
17                         <execution>
18                             <phase>validate</phase>
19                             <goals>
20                                 <goal>check</goal>
21                             </goals>
22                         </execution>
23                     </executions>
24                 </plugin>
原文地址:https://www.cnblogs.com/endv/p/11204698.html