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

kwin 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 8aa51bc  SLING-11529 collect coverage for m-invoker-p (#32)
8aa51bc is described below

commit 8aa51bcf23f2a32da269ffabf697f4fe92f5320a
Author: Konrad Windszus <[email protected]>
AuthorDate: Fri Dec 23 16:03:34 2022 +0100

    SLING-11529 collect coverage for m-invoker-p (#32)
    
    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>
 

Reply via email to