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-org-apache-sling-graphql-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a789a6  SLING-9787 - Switch to the latest parent pom to simplify 
JaCoCo configuration
6a789a6 is described below

commit 6a789a6635f45134d6791be30ce24473b71560e4
Author: Radu Cotescu <[email protected]>
AuthorDate: Fri Oct 2 16:59:25 2020 +0200

    SLING-9787 - Switch to the latest parent pom to simplify JaCoCo 
configuration
---
 pom.xml                                            | 65 +---------------------
 .../graphql/core/it/GraphQLCoreTestSupport.java    | 14 +++--
 2 files changed, 10 insertions(+), 69 deletions(-)

diff --git a/pom.xml b/pom.xml
index e752189..bcc8f94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.sling</groupId>
     <artifactId>sling-bundle-parent</artifactId>
-    <version>38</version>
+    <version>40-SNAPSHOT</version>
     <relativePath />
   </parent>
 
@@ -39,8 +39,6 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
     <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version>
-    <jacoco.maven.plugin.version>0.8.2</jacoco.maven.plugin.version>
-
     <!-- additional options that can be passed to Pax before executing the 
tests -->
     <pax.vm.options />
   </properties>
@@ -63,66 +61,6 @@
         <artifactId>bnd-baseline-maven-plugin</artifactId>
       </plugin>
       <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-        <version>${jacoco.maven.plugin.version}</version>
-        <configuration>
-          <propertyName>jacoco.command</propertyName>
-        </configuration>
-        <executions>
-          <execution>
-            <id>prepare-agent</id>
-            <configuration>
-              <destFile>${project.build.directory}/jacoco-unit.exec</destFile>
-            </configuration>
-            <phase>generate-test-resources</phase>
-            <goals>
-              <goal>prepare-agent</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>prepare-agent-integration</id>
-            <configuration>
-              <destFile>${project.build.directory}/jacoco-it.exec</destFile>
-            </configuration>
-            <goals>
-              <goal>prepare-agent-integration</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>merge</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>merge</goal>
-            </goals>
-            <configuration>
-              <fileSets>
-                <fileSet>
-                  <directory>${project.build.directory}</directory>
-                  <includes>
-                    <include>*.exec</include>
-                  </includes>
-                </fileSet>
-              </fileSets>
-            </configuration>
-          </execution>
-          <execution>
-            <id>report</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>report</goal>
-            </goals>
-          </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>
         <executions>
@@ -135,7 +73,6 @@
         </executions>
         <configuration>
           <systemPropertyVariables>
-            <jacoco.command>${jacoco.command}</jacoco.command>
             
<bundle.filename>${basedir}/target/${project.build.finalName}.jar</bundle.filename>
             <pax.vm.options>${pax.vm.options}</pax.vm.options>
           </systemPropertyVariables>
diff --git 
a/src/test/java/org/apache/sling/graphql/core/it/GraphQLCoreTestSupport.java 
b/src/test/java/org/apache/sling/graphql/core/it/GraphQLCoreTestSupport.java
index e920333..71c948a 100644
--- a/src/test/java/org/apache/sling/graphql/core/it/GraphQLCoreTestSupport.java
+++ b/src/test/java/org/apache/sling/graphql/core/it/GraphQLCoreTestSupport.java
@@ -82,10 +82,15 @@ public abstract class GraphQLCoreTestSupport extends 
TestSupport {
             vmOption = new VMOption(vmOpt);
         }
 
+        final String jacocoOpt = System.getProperty("jacoco.command");
+        VMOption jacocoCommand = null;
+        if (StringUtils.isNotEmpty(jacocoOpt)) {
+            jacocoCommand = new VMOption(jacocoOpt);
+        }
+
         return composite(
-            when(vmOption != null).useOptions(
-                vmOption
-            ),
+            when(vmOption != null).useOptions(vmOption),
+            when(jacocoCommand != null).useOptions(jacocoCommand),
             super.baseConfiguration(),
             slingQuickstart(),
             graphQLJava(),
@@ -99,8 +104,7 @@ public abstract class GraphQLCoreTestSupport extends 
TestSupport {
             slingResourcePresence(),
             slingCommonsMetrics(),
             jsonPath(),
-            junitBundles(),
-            vmOption(System.getProperty("jacoco.command"))
+            junitBundles()
         );
     }
 

Reply via email to