我在 maven 2 中使用 checkstyle 插件。我现在想将我的配置文件从默认文件切换到 a) 在线文件或 b) 本地文件。我尝试了以下两件事,但都没有奏效。有什么建议么?
A) 本地文件,直接在我的项目文件夹中 pom.xml 旁边
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
B)远程文件,存储在服务器上
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>http://stud.hs-heilbronn.de/~nischmid/development/checkstyle-config.xml</configLocation>
</configuration>
</plugin>
这两种情况都会导致如下错误:
[INFO] Checkstyle 报告生成发生错误。嵌入式错误:在 checkstyle 执行期间失败找不到资源“文件:checkstyle.xml”。
任何帮助,将不胜感激!