我真的很想让JaCoCo在我们的构建环境中工作。 我在项目的父POM中配置了JaCoCo,在我的(Windows)机器和同事的(Linux)机器上配置了JaCoCo,以jacoco为目标的maven构建可以完美运行,并生成覆盖报告。但是,在我们的Jenkins服务器上,我无法让JaCoCo生成报告。 一切都始于构建阶段:
[INFO] --- jacoco-maven-plugin:0.8.1:prepare-agent (default-cli) @ XXXXXX ---
[INFO] argLine set to -javaagent:/app/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/app/jenkins/.jenkins/workspace/XXXXXX_trunk/target/jacoco.exec
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.1:prepare-agent (jacoco-initialize) @ XXXXXX ---
[INFO] argLine set to -javaagent:/app/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/app/jenkins/.jenkins/workspace/XXXXXX_db_trunk/target/jacoco.exec
但是在测试阶段,它变得混乱了:
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ XXXXXXX ---
[INFO] Building jar: /app/jenkins/.jenkins/workspace/XXXXXXXX_trunk/target/XXXXXXX-trunk.jar
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.1:report (jacoco-site) @ XXXXXXX ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
有人知道为什么它不能在Jenkins服务器上工作吗?它使用与开发机相同的JDK以及相同的Maven版本和配置。
感谢和问候