如果有checkstyle错误,是否有可能以某种方式迫使maven失败?现在我必须运行site目标来生成javadocs和checkstyle报告.我想在install目标上实现它,如果checkstyle有一些错误,我需要构建失败.这有可能实现吗?
现在我有我checkstyle的maven报告块:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<configLocation>src/test/resources/checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
Run Code Online (Sandbox Code Playgroud)