我是 maven 和 chekstyle 的新手,所以需要问一些问题......我想在基于 maven 的项目中使用 checkstyle,所以在我的项目中pom.xml
添加了依赖项
<dependency>
<groupId>checkstyle</groupId>
<artifactId>checkstyle</artifactId>
<version>2.4</version>
</dependency>
而且我还在插件标签中添加了条目:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.4</version>
<configuration>
<enableRulesSummary>true</enableRulesSummary>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
但是当我使用 command 运行我的 maven 构建时mvn clean install
, checkstyle 什么也没做。而且由于我checkstyle.xml
的系统中还没有任何东西,它不应该抱怨我的错误吗?
我还缺少什么配置?