You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2021/06/22 09:33:22 UTC

[sling-org-apache-sling-commons-clam] branch master updated (f3f2fb9 -> 3737819)

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

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-clam.git.


    from f3f2fb9  SLING-10344 Update to Sling Bundle Parent 41
     new 7b94209  SLING-9698 Enable code coverage with JaCoCo
     new 3737819  SLING-10517 Update to Sling Bundle Parent 43

The 2 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.


Summary of changes:
 pom.xml                                            | 36 +---------------------
 .../commons/clam/it/tests/ClamTestSupport.java     | 13 +++++++-
 2 files changed, 13 insertions(+), 36 deletions(-)

[sling-org-apache-sling-commons-clam] 01/02: SLING-9698 Enable code coverage with JaCoCo

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-clam.git

commit 7b94209baa764aa716692ce7de02c414ff6d0c6c
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jun 22 11:31:40 2021 +0200

    SLING-9698 Enable code coverage with JaCoCo
    
    inherit system properties from parent and check command
---
 pom.xml                                            | 26 ----------------------
 .../commons/clam/it/tests/ClamTestSupport.java     | 13 ++++++++++-
 2 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/pom.xml b/pom.xml
index f4d8fa0..ba6b423 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,35 +88,9 @@
               <name>bundle.filename</name>
               <value>${basedir}/target/${project.build.finalName}.jar</value>
             </property>
-            <property>
-              <name>jacoco.command</name>
-              <value>${jacoco.command}</value>
-            </property>
           </systemProperties>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>prepare-agent</id>
-            <configuration>
-              <propertyName>jacoco.command</propertyName>
-            </configuration>
-            <goals>
-              <goal>prepare-agent</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>report</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>report</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 
diff --git a/src/test/java/org/apache/sling/commons/clam/it/tests/ClamTestSupport.java b/src/test/java/org/apache/sling/commons/clam/it/tests/ClamTestSupport.java
index 647158e..733fdad 100644
--- a/src/test/java/org/apache/sling/commons/clam/it/tests/ClamTestSupport.java
+++ b/src/test/java/org/apache/sling/commons/clam/it/tests/ClamTestSupport.java
@@ -22,11 +22,14 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.time.Duration;
 import java.util.Arrays;
+import java.util.Objects;
 
 import org.apache.sling.testing.paxexam.TestSupport;
 import org.jetbrains.annotations.NotNull;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.options.OptionalCompositeOption;
+import org.ops4j.pax.exam.options.extra.VMOption;
 import org.testcontainers.containers.GenericContainer;
 
 import static org.apache.sling.testing.paxexam.SlingOptions.scr;
@@ -35,6 +38,7 @@ import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.vmOption;
+import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
 
 public abstract class ClamTestSupport extends TestSupport {
@@ -73,10 +77,17 @@ public abstract class ClamTestSupport extends TestSupport {
             // testing
             testcontainers(),
             junitBundles(),
-            vmOption(System.getProperty("jacoco.command"))
+            jacoco() // remove with Testing PaxExam 4.0
         );
     }
 
+    // remove with Testing PaxExam 4.0
+    protected OptionalCompositeOption jacoco() {
+        final String jacocoCommand = System.getProperty("jacoco.command");
+        final VMOption option = Objects.nonNull(jacocoCommand) && !jacocoCommand.trim().isEmpty() ? vmOption(jacocoCommand) : null;
+        return when(Objects.nonNull(option)).useOptions(option);
+    }
+
     protected static class InfiniteInputStream extends InputStream {
 
         @Override

[sling-org-apache-sling-commons-clam] 02/02: SLING-10517 Update to Sling Bundle Parent 43

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-clam.git

commit 3737819f045e25b83341a3a492480acc48b9639e
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jun 22 11:33:02 2021 +0200

    SLING-10517 Update to Sling Bundle Parent 43
---
 pom.xml | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/pom.xml b/pom.xml
index ba6b423..d3a9344 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.sling</groupId>
     <artifactId>sling-bundle-parent</artifactId>
-    <version>41</version>
+    <version>43</version>
     <relativePath />
   </parent>
 
@@ -49,14 +49,6 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-baseline-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
         <groupId>org.apache.servicemix.tooling</groupId>
         <artifactId>depends-maven-plugin</artifactId>
       </plugin>