Skip to content

Commit e0cd540

Browse files
authored
Enforce JaCoCo execution by default with opt-out via jacocoStrict (#1403)
1 parent bef7d7a commit e0cd540

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

pom.xml

+21-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ com.fasterxml.jackson.core.*;version=${project.version}
5858

5959
<!-- for Reproducible Builds -->
6060
<project.build.outputTimestamp>2024-09-27T01:42:02Z</project.build.outputTimestamp>
61+
62+
<!-- for validation of JaCoCo execution -->
63+
<jacocoStrict>true</jacocoStrict>
6164
</properties>
6265

6366
<!-- Alas, need to include snapshot reference since otherwise can not find
@@ -88,7 +91,7 @@ com.fasterxml.jackson.core.*;version=${project.version}
8891
</execution>
8992
<execution>
9093
<id>report</id>
91-
<phase>test</phase>
94+
<phase>verify</phase>
9295
<goals>
9396
<goal>report</goal>
9497
</goals>
@@ -105,6 +108,23 @@ com.fasterxml.jackson.core.*;version=${project.version}
105108
<phase>validate</phase>
106109
<goals><goal>enforce</goal></goals>
107110
</execution>
111+
<execution>
112+
<id>enforce-jacoco-exec</id>
113+
<phase>verify</phase>
114+
<goals>
115+
<goal>enforce</goal>
116+
</goals>
117+
<configuration>
118+
<rules>
119+
<requireFilesExist>
120+
<files>
121+
<file>${project.build.directory}/jacoco.exec</file>
122+
</files>
123+
</requireFilesExist>
124+
</rules>
125+
<fail>${jacocoStrict}</fail>
126+
</configuration>
127+
</execution>
108128
</executions>
109129
</plugin>
110130

0 commit comments

Comments
 (0)