Jacoco classnotfound 异常

时间:2021-07-07 13:06:30

标签: java spring maven jacoco jacoco-maven-plugin

当我从 Jenkins 运行时,我正在使用 jacococ 0.8.7 版本、maven 3.3.9 版本、jDK 1.8 我正面临以下异常。可能是什么问题?当我使用 jacoco 0.7.4 时它有效

在 Jenkins 中使用的命令:

 -Dmaven.test.failure.ignore=true -U clean org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent org.jacoco:jacoco-maven-plugin:0.8.7:report test

错误

<块引用>

目标 org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent failed: A required class is missing while execution org.jacoco:jacoco-maven-plugin:0.8.7:prepare -agent: org/jacoco/core/runtime/AgentOptions

pom.xml

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.7</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <!-- attached to Maven test phase -->
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                            </plugins>
        </pluginManagement>
    </build>

0 个答案:

没有答案
相关问题