Maven CheckStyle错误:Checkstyle执行期间失败:Checkstyle 6.18使用sun_checks.xml规则集

时间:2019-03-13 15:24:34

标签: maven-checkstyle-plugin

这是我的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.pokewords</groupId>
    <artifactId>maven-practice</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

我使用了默认配置规则集 sun_checks.xml , 执行mvn test时出现错误:

[错误]无法在项目maven上执行目标org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check(验证):在checkstyle执行期间失败: Checkstyle 6.18使用sun_checks.xml规则集报告了1个错误。

会发生什么?谢谢。

0 个答案:

没有答案