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 2019/06/15 14:44:09 UTC

[sling-org-apache-sling-commons-html] branch master updated: SLING-8508 Make testing compliant with Java 9 and higher

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-html.git


The following commit(s) were added to refs/heads/master by this push:
     new 3447042  SLING-8508 Make testing compliant with Java 9 and higher
3447042 is described below

commit 3447042385ca005a1a2df987de9f4f24bb6a467c
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sat Jun 15 16:43:53 2019 +0200

    SLING-8508 Make testing compliant with Java 9 and higher
    
    * Use Sling Bundle Parent 35
    * Update Pax Exam to 4.13.1
    * Update Testing PaxExam to 3.0.0
    * Update Felix Framework to 6.0.3
    * Use logback Option
---
 pom.xml                                               | 10 +++++-----
 .../apache/sling/commons/html/it/HtmlTestSupport.java | 19 ++++---------------
 2 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0553c3c..e61b463 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,8 +22,8 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>34</version>
+        <artifactId>sling-bundle-parent</artifactId>
+        <version>35</version>
         <relativePath />
     </parent>
 
@@ -36,7 +36,7 @@
     </description>
 
     <properties>
-        <org.ops4j.pax.exam.version>4.12.0</org.ops4j.pax.exam.version>
+        <org.ops4j.pax.exam.version>4.13.1</org.ops4j.pax.exam.version>
     </properties>
     <scm>
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-html.git</connection>
@@ -147,7 +147,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.framework</artifactId>
-            <version>5.6.10</version>
+            <version>6.0.3</version>
             <scope>test</scope>
         </dependency>
         <!-- Apache Sling -->
@@ -160,7 +160,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.paxexam</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
         <!-- logging -->
diff --git a/src/test/java/org/apache/sling/commons/html/it/HtmlTestSupport.java b/src/test/java/org/apache/sling/commons/html/it/HtmlTestSupport.java
index b1d5b51..7230487 100644
--- a/src/test/java/org/apache/sling/commons/html/it/HtmlTestSupport.java
+++ b/src/test/java/org/apache/sling/commons/html/it/HtmlTestSupport.java
@@ -19,19 +19,18 @@
 package org.apache.sling.commons.html.it;
 
 import org.apache.sling.testing.paxexam.TestSupport;
-import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.options.ModifiableCompositeOption;
 
+import static org.apache.sling.testing.paxexam.SlingOptions.logback;
 import static org.apache.sling.testing.paxexam.SlingOptions.scr;
 import static org.apache.sling.testing.paxexam.SlingVersionResolver.SLING_GROUP_ID;
 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.systemProperty;
-import org.ops4j.pax.exam.util.PathUtils;
 
 public abstract class HtmlTestSupport extends TestSupport {
 
-    public Option baseConfiguration() {
+    public ModifiableCompositeOption baseConfiguration() {
         return composite(
             super.baseConfiguration(),
             // Sling Commons HTML
@@ -42,18 +41,8 @@ public abstract class HtmlTestSupport extends TestSupport {
             mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
             mavenBundle().groupId("org.apache.commons").artifactId("commons-lang3").versionAsInProject(),
             junitBundles(),
-            logging()
+            logback()
         );
     }
 
-    protected Option logging() {
-        final String filename = String.format("file:%s/src/test/resources/logback.xml", PathUtils.getBaseDir());
-        return composite(
-            systemProperty("logback.configurationFile").value(filename),
-            mavenBundle().groupId("org.slf4j").artifactId("slf4j-api").version("1.7.21"),
-            mavenBundle().groupId("org.slf4j").artifactId("jcl-over-slf4j").version("1.7.21"),
-            mavenBundle().groupId("ch.qos.logback").artifactId("logback-core").version("1.1.7"),
-            mavenBundle().groupId("ch.qos.logback").artifactId("logback-classic").version("1.1.7")
-        );
-    }
 }