You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2020/09/30 15:06:35 UTC
[sling-parent] branch master updated: SLING-9775 - Improve JaCoCo
code coverage setup
This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-parent.git
The following commit(s) were added to refs/heads/master by this push:
new 149cc41 SLING-9775 - Improve JaCoCo code coverage setup
149cc41 is described below
commit 149cc4109602464098bed0e622f26aceab027f64
Author: Radu Cotescu <17...@users.noreply.github.com>
AuthorDate: Wed Sep 30 17:06:24 2020 +0200
SLING-9775 - Improve JaCoCo code coverage setup
* define a project property that provides the JaCoCo agent path
* define default configurations for surefire and failsafe which use
the JaCoCo agent to collect coverage
---
sling-parent/pom.xml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index 5cf78e4..615e736 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -484,6 +484,9 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
+ <configuration>
+ <propertyName>jacoco.command</propertyName>
+ </configuration>
<executions>
<execution>
<id>prepare-agent</id>
@@ -555,6 +558,27 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${jacoco.command}</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <argLine>${jacoco.command}</argLine>
+ <systemPropertyVariables>
+ <!--
+ for IT where you need a forked JVM to run the tests you can use this system property to make sure that
+ the JaCoCo agent correctly instruments your code
+ -->
+ <jacoco.command>${jacoco.command}</jacoco.command>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>