Jacoco classnotfound 异常

问题描述

当我从 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>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)