【发布时间】:2013-11-07 05:12:08
【问题描述】:
我是第一次使用 maven checkstyle 插件。我在父 pom 中添加了 checkstyle 插件,并在 checkstyle.xml 中指定了一些规则列表。
我运行“mvn clean site”来生成报告。每件事都运行良好,但它也会生成许多不需要的报告。我该如何预防。
我尝试了“mvn clean checkstyle:checkstyle”,但它没有考虑我的 checkstyle.xml 规则。 IE。它还会生成所有违反默认规则的报告。
而且网页也显示不正确。 IE。它生成没有样式的 .html 文件(.css 文件),所以看起来很糟糕。
在我的 pom.xml 中是
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.10</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.10</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
【问题讨论】:
标签: maven-plugin static-analysis checkstyle maven-site-plugin