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 15:45:01 UTC

[sling-org-apache-sling-jcr-presence] branch master updated (6543c9a -> 597830d)

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-jcr-presence.git.


    from 6543c9a  Adding sonarqube badges as per SLING-9682
     new 6944f00  SLING-10531 Update to Sling Bundle Parent 43
     new 597830d  SLING-10532 Enable code coverage with JaCoCo

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                                                  | 15 ++++-----------
 .../sling/jcr/presence/JcrPresenceTestSupport.java       | 16 +++++++++++++++-
 2 files changed, 19 insertions(+), 12 deletions(-)

[sling-org-apache-sling-jcr-presence] 01/02: SLING-10531 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-jcr-presence.git

commit 6944f001f78c403ebe88a20c1be8a649a9c1a000
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jun 22 17:43:55 2021 +0200

    SLING-10531 Update to Sling Bundle Parent 43
---
 pom.xml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3097716..7ac50ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.sling</groupId>
     <artifactId>sling-bundle-parent</artifactId>
-    <version>39</version>
+    <version>43</version>
     <relativePath />
   </parent>
 
@@ -52,10 +52,6 @@
     <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>
         <configuration>
           <failOnMissing>false</failOnMissing>

[sling-org-apache-sling-jcr-presence] 02/02: SLING-10532 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-jcr-presence.git

commit 597830d6e997b149036828079bd5417c435748a6
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jun 22 17:44:51 2021 +0200

    SLING-10532 Enable code coverage with JaCoCo
---
 pom.xml                                                  |  9 +++------
 .../sling/jcr/presence/JcrPresenceTestSupport.java       | 16 +++++++++++++++-
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7ac50ae..ae66bf7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,12 +74,9 @@
         </executions>
         <configuration>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
-          <systemProperties>
-            <property>
-              <name>bundle.filename</name>
-              <value>${basedir}/target/${project.build.finalName}.jar</value>
-            </property>
-          </systemProperties>
+          <systemPropertyVariables combine.children="append">
+            <bundle.filename>${basedir}/target/${project.build.finalName}.jar</bundle.filename>
+          </systemPropertyVariables>
         </configuration>
       </plugin>
     </plugins>
diff --git a/src/test/java/org/apache/sling/jcr/presence/JcrPresenceTestSupport.java b/src/test/java/org/apache/sling/jcr/presence/JcrPresenceTestSupport.java
index fb21c5e..ebc2fb5 100644
--- a/src/test/java/org/apache/sling/jcr/presence/JcrPresenceTestSupport.java
+++ b/src/test/java/org/apache/sling/jcr/presence/JcrPresenceTestSupport.java
@@ -18,12 +18,16 @@
  */
 package org.apache.sling.jcr.presence;
 
+import java.util.Objects;
+
 import javax.inject.Inject;
 
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.testing.paxexam.TestSupport;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.options.ModifiableCompositeOption;
+import org.ops4j.pax.exam.options.OptionalCompositeOption;
+import org.ops4j.pax.exam.options.extra.VMOption;
 import org.osgi.framework.BundleContext;
 
 import static org.apache.sling.testing.paxexam.SlingOptions.awaitility;
@@ -31,6 +35,8 @@ import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTa
 import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
+import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
 import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
@@ -63,10 +69,18 @@ public abstract class JcrPresenceTestSupport extends TestSupport {
             mavenBundle().groupId("com.googlecode.java-diff-utils").artifactId("diffutils").versionAsInProject(),
             newConfiguration("org.apache.sling.jcr.base.internal.LoginAdminWhitelist")
                 .put("whitelist.bundles.regexp", "PAXEXAM-PROBE-.*")
-                .asOption()
+                .asOption(),
+            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 Option slingQuickstart() {
         final int httpPort = findFreePort();
         final String workingDirectory = workingDirectory();