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/29 19:29:09 UTC

[sling-parent] branch issue/SLING-9775 created (now 0228999)

This is an automated email from the ASF dual-hosted git repository.

radu pushed a change to branch issue/SLING-9775
in repository https://gitbox.apache.org/repos/asf/sling-parent.git.


      at 0228999  SLING-9775 - Improve JaCoCo code coverage setup

This branch includes the following new commits:

     new 0228999  SLING-9775 - Improve JaCoCo code coverage setup

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[sling-parent] 01/01: SLING-9775 - Improve JaCoCo code coverage setup

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch issue/SLING-9775
in repository https://gitbox.apache.org/repos/asf/sling-parent.git

commit 02289991fd03840190a6ddac4575948990089e99
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Sep 29 21:27:29 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>