我在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>
Run Code Online (Sandbox Code Playgroud)
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>
Run Code Online (Sandbox Code Playgroud)
这两种情况都会导致如下错误:
[INFO] Checkstyle报告生成中发生错误.嵌入式错误:在checkstyle执行期间失败无法找到资源'file:checkstyle.xml'.
任何帮助,将不胜感激!