Skip to content

Commit e22246b

Browse files
authored
Restore code coverage calculation (#638)
1 parent e622ccd commit e22246b

File tree

1 file changed

+10
-83
lines changed

1 file changed

+10
-83
lines changed

pom.xml

Lines changed: 10 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@
8484
<artifactId>slf4j-api</artifactId>
8585
<version>${version.slf4j}</version>
8686
</dependency>
87-
<!--
87+
<!--
8888
Commons lang slated for removal but kept for projects that accidentally depend on it
8989
through accidental transitive runtime dependencies.
90-
90+
9191
For projects that depend on it for compile they will get an immediate failure as the
9292
scope is now runtime instead of compile.
9393
-->
@@ -291,62 +291,35 @@
291291
<artifactId>maven-surefire-plugin</artifactId>
292292
<version>2.22.2</version>
293293
<configuration>
294-
<argLine>-Duser.language=en -Duser.region=GB</argLine>
294+
<argLine>@{argLine} -Duser.language=en -Duser.region=GB</argLine>
295295
</configuration>
296296
</plugin>
297-
<!-- JACOCO added for code coverage -->
298297
<plugin>
299298
<groupId>org.jacoco</groupId>
300299
<artifactId>jacoco-maven-plugin</artifactId>
301-
<version>0.8.6</version>
300+
<version>0.8.8</version>
302301
<executions>
302+
<!-- Prepares the property pointing to the JaCoCo
303+
runtime agent which is passed as VM argument when Maven the Surefire plugin
304+
is executed. -->
303305
<execution>
304306
<id>pre-unit-test</id>
305307
<goals>
306308
<goal>prepare-agent</goal>
307309
</goals>
308-
<configuration>
309-
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
310-
</configuration>
311310
</execution>
311+
312+
<!-- Ensures that the code coverage report for
313+
unit tests is created after unit tests have been run. -->
312314
<execution>
313315
<id>post-unit-test</id>
314316
<phase>test</phase>
315317
<goals>
316318
<goal>report</goal>
317319
</goals>
318-
<configuration>
319-
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
320-
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
321-
</configuration>
322-
</execution>
323-
<!-- End Executions for unit tests -->
324-
<!-- The Executions for integration tests -->
325-
<execution>
326-
<id>pre-integration-test</id>
327-
<phase>pre-integration-test</phase>
328-
<goals>
329-
<goal>prepare-agent</goal>
330-
</goals>
331-
<configuration>
332-
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
333-
</configuration>
334-
</execution>
335-
<execution>
336-
<id>post-integration-test</id>
337-
<phase>post-integration-test</phase>
338-
<goals>
339-
<goal>report</goal>
340-
</goals>
341-
<configuration>
342-
<dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
343-
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
344-
</configuration>
345320
</execution>
346-
<!-- End Executions for integration tests -->
347321
</executions>
348322
</plugin>
349-
<!-- end JACOCO -->
350323
</plugins>
351324
</build>
352325
<reporting>
@@ -359,52 +332,6 @@
359332
</plugins>
360333
</reporting>
361334
<profiles>
362-
<profile>
363-
<id>dev</id>
364-
<build>
365-
<plugins>
366-
<plugin>
367-
<groupId>org.jacoco</groupId>
368-
<artifactId>jacoco-maven-plugin</artifactId>
369-
<version>0.8.6</version>
370-
<executions>
371-
<!-- The Executions for merging -->
372-
<execution>
373-
<id>merge-results</id>
374-
<phase>verify</phase>
375-
<goals>
376-
<goal>merge</goal>
377-
</goals>
378-
<configuration>
379-
<fileSets>
380-
<fileSet>
381-
<directory>${project.build.directory}/coverage-reports</directory>
382-
<includes>
383-
<include>*.exec</include>
384-
</includes>
385-
</fileSet>
386-
</fileSets>
387-
<destFile>${project.build.directory}/coverage-reports/aggregate.exec</destFile>
388-
</configuration>
389-
</execution>
390-
<execution>
391-
<id>post-merge-report</id>
392-
<phase>verify</phase>
393-
<goals>
394-
<goal>report</goal>
395-
</goals>
396-
<configuration>
397-
<dataFile>${project.build.directory}/coverage-reports/aggregate.exec</dataFile>
398-
<outputDirectory>${project.reporting.outputDirectory}/jacoco-aggregate
399-
</outputDirectory>
400-
</configuration>
401-
</execution>
402-
<!-- End Executions for merging -->
403-
</executions>
404-
</plugin>
405-
</plugins>
406-
</build>
407-
</profile>
408335
<profile>
409336
<id>release-sign-artifacts</id>
410337
<activation>

0 commit comments

Comments
 (0)