Skip to content

Commit 4c2f760

Browse files
committed
Add Jacoco
1 parent 2be771d commit 4c2f760

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
<properties>
1616
<gson.version>2.13.1</gson.version>
17+
<jacoco.version>0.8.13</jacoco.version>
1718
<jib-maven-plugin.version>3.4.5</jib-maven-plugin.version>
1819
<junit-jupiter.version>5.13.1</junit-jupiter.version>
1920
<kafka-streams.version>4.0.0</kafka-streams.version>
@@ -142,6 +143,41 @@
142143
</execution>
143144
</executions>
144145
</plugin>
146+
147+
<plugin>
148+
<groupId>org.jacoco</groupId>
149+
<artifactId>jacoco-maven-plugin</artifactId>
150+
<version>${jacoco.version}</version>
151+
<executions>
152+
<execution>
153+
<id>jacoco-initialize</id>
154+
<goals>
155+
<goal>prepare-agent</goal>
156+
</goals>
157+
</execution>
158+
<execution>
159+
<id>report</id>
160+
<goals>
161+
<goal>report</goal>
162+
</goals>
163+
<phase>prepare-package</phase>
164+
</execution>
165+
<execution>
166+
<id>post-unit-test</id>
167+
<goals>
168+
<goal>report</goal>
169+
</goals>
170+
<phase>test</phase>
171+
<configuration>
172+
<!-- Sets the path to the file which contains the execution data. -->
173+
<dataFile>target/jacoco.exec</dataFile>
174+
<!-- Sets the output directory for the code coverage report. -->
175+
<outputDirectory>target/jacoco-ut</outputDirectory>
176+
</configuration>
177+
</execution>
178+
</executions>
179+
</plugin>
180+
145181
<plugin>
146182
<groupId>com.google.cloud.tools</groupId>
147183
<artifactId>jib-maven-plugin</artifactId>

0 commit comments

Comments
 (0)