【发布时间】:2017-03-14 13:03:02
【问题描述】:
上周我在与 Jenkins 合作时发现了一个奇怪的时刻。 在我的多模块项目中,我在 Jenkins 中使用 Jacoco 测试覆盖率 和 Jacoco-plugin。
我在我的 Jenkins 中开始了一些工作,当涉及到 测试阶段时,将创建 Jacoco 进程,并且在作业执行后,该进程将被关闭。但是当作业在测试阶段卡住时,唯一的办法就是终止作业。但在这种情况下,Jacoco 进程不会关闭,即使在 Jenkins 重新启动后也是如此。 唯一的方法是杀死进程。
我有一个 Jenkins 在我的物理机器上运行,另一个在 docker 上运行。两种情况都会出现问题。
这是我在父 pom.xml 中的 Jacoco 配置,但我确信这不是重点。:
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<configuration>
<excludes>
<exclude>**/*Builder.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
</executions>
</plugin>
有没有人遇到过同样的问题,或者有一些提示或猜测?
【问题讨论】:
标签: maven jenkins jacoco jacoco-maven-plugin