【发布时间】:2010-02-17 10:23:12
【问题描述】:
我在 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.xml'。
任何帮助将不胜感激!
【问题讨论】:
标签: maven-2 checkstyle