You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/11/23 11:08:18 UTC

[sling-parent] branch feature/SLING-11529-collect-coverage-with-m-invoker-p created (now b039ad9)

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

kwin pushed a change to branch feature/SLING-11529-collect-coverage-with-m-invoker-p
in repository https://gitbox.apache.org/repos/asf/sling-parent.git


      at b039ad9  SLING-11529 collect coverage for m-invoker-p

This branch includes the following new commits:

     new b039ad9  SLING-11529 collect coverage for m-invoker-p

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-11529 collect coverage for m-invoker-p

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

kwin pushed a commit to branch feature/SLING-11529-collect-coverage-with-m-invoker-p
in repository https://gitbox.apache.org/repos/asf/sling-parent.git

commit b039ad99f3cee8121f60f074f6cae34129120cf6
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Nov 23 12:08:11 2022 +0100

    SLING-11529 collect coverage for m-invoker-p
    
    set up agent configuration for IT and UT in separate properties
    cleanup
---
 sling-parent/pom.xml | 66 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 28 deletions(-)

diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index 362f3b3..650cce5 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -362,9 +362,6 @@
                     <plugin>
                         <groupId>org.jacoco</groupId>
                         <artifactId>jacoco-maven-plugin</artifactId>
-                        <configuration>
-                            <propertyName>jacoco.command</propertyName>
-                        </configuration>
                         <executions>
                             <execution>
                                 <id>prepare-agent</id>
@@ -373,7 +370,8 @@
                                 </goals>
                                 <configuration>
                                     <append>true</append>
-                                    <destFile>${project.build.directory}/jacoco-unit.exec</destFile>
+                                    <destFile>${project.build.directory}/jacoco-ut.exec</destFile>
+                                    <propertyName>jacoco.ut.command</propertyName>
                                 </configuration>
                             </execution>
                             <execution>
@@ -384,6 +382,7 @@
                                 <configuration>
                                     <append>true</append>
                                     <destFile>${project.build.directory}/jacoco-it.exec</destFile>
+                                    <propertyName>jacoco.it.command</propertyName>
                                 </configuration>
                             </execution>
                             <execution>
@@ -392,8 +391,8 @@
                                     <goal>report</goal>
                                 </goals>
                                 <configuration>
-                                    <dataFile>${project.build.directory}/jacoco-unit.exec</dataFile>
-                                    <outputDirectory> ${project.reporting.outputDirectory}/jacoco-unit</outputDirectory>
+                                    <dataFile>${project.build.directory}/jacoco-ut.exec</dataFile>
+                                    <outputDirectory> ${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                                 </configuration>
                             </execution>
                             <execution>
@@ -418,7 +417,7 @@
                                         <fileSet>
                                             <directory>${project.build.directory}</directory>
                                             <includes>
-                                                <include>jacoco-unit.exec</include>
+                                                <include>jacoco-ut.exec</include>
                                                 <include>jacoco-it.exec</include>
                                             </includes>
                                         </fileSet>
@@ -438,28 +437,39 @@
                             </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>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-surefire-plugin</artifactId>
+                            <configuration>
+                                <argLine>${jacoco.ut.command}</argLine>
+                            </configuration>
+                        </plugin>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-failsafe-plugin</artifactId>
+                            <configuration>
+                                <argLine>${jacoco.it.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.it.command>${jacoco.it.command}</jacoco.it.command>
+                                </systemPropertyVariables>
+                            </configuration>
+                        </plugin>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-invoker-plugin</artifactId>
+                            <configuration>
+                                <mavenOpts>${jacoco.it.command}</mavenOpts>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
             </build>
         </profile>