为了实现所需的功能,除了报告生命周期外,还需要在构建生命周期中使用maven-checkstyle-plugin:
<project>...<build>... <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.8</version> <executions> <execution> <phase>process-sources</phase> <goals> <goal>check</goal> </goals> </execution> </executions> <configuration> <failsOnError>true</failsOnError> </configuration> </plugin> </plugins></build></project>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)