使用spring boot 1.3.1时"找不到资源'src/checkstyle/checkstyle-suppressions.xml"

Jer*_*ang 5 maven spring-boot

maven-checkstyle-plugin不应该提供默认的config xml文件吗?运行maven时为什么会出现此错误?

我不能谷歌解决这个问题的一些解决方案,请帮我搞定,谢谢!

错误消息如下:

[错误]无法执行目标org.apache.maven.plugins:maven-checkstyle-plugin:2.16:check(checkstyle-validation)on project explorer-parent:在checkstyle执行期间失败:无法在位置找到抑制文件:src/checkstyle/checkstyle-suppressions.xml:找不到资源'src/checkstyle/checkstyle-suppressions.xml'. - > [帮助1]


附加的pom文件: 父pom 模块pom

And*_*son 14

您使用的是错误的父母pom.xml file.你正在使用,spring-boot-parent但它应该是spring-boot-starter-parent.

更新pom.xmlexplorer-parent,这样它<parent>看起来像这样:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.1.RELEASE</version>
</parent>
Run Code Online (Sandbox Code Playgroud)