小编Bu5*_*5to的帖子

jacoco 检查中的错误 - 参数“规则”丢失或无效

这是我在运行 mvn jacoco:check for a maven application 时遇到的错误。因此,不会生成报告。

 [ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.3:check (default-cli) on project 

    Netflix: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.8.3:check are missing or invalid -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.3:check (default-cli) on project Netflix: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.8.3:check are missing or invalid
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
Run Code Online (Sandbox Code Playgroud)

这是我在 pom.xml 中的 jacoco 插件。我觉得规则没问题。我想知道缺少什么...

<plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.2</version>
            <executions>
                <execution>
                    <id>default-prepare-agent</id>
                    <phase>test</phase>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                    <configuration>
                        <!-- Sets the …
Run Code Online (Sandbox Code Playgroud)

testing maven jacoco jacoco-maven-plugin jacoco-plugin

4
推荐指数
1
解决办法
2758
查看次数