You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2018/07/05 06:48:12 UTC

[karaf] branch master updated: ensure Karaf can build and run with JDK11/JDK10

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

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 04eb004  ensure Karaf can build and run with JDK11/JDK10
     new d96685f  Merge branch 'master' of github.com:apache/karaf
04eb004 is described below

commit 04eb0044136c292507be3546d2f5ca944cf212db
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Wed Jun 20 17:39:17 2018 +0800

    ensure Karaf can build and run with JDK11/JDK10
---
 assemblies/features/base/pom.xml                   |  76 +++++-
 .../main/filtered-resources/resources/bin/karaf    |   7 -
 .../resources/etc/config.properties                |   6 +
 .../resources/etc/jre.properties                   |  21 +-
 .../framework/src/main/feature/feature.xml         |   3 +
 .../apache/karaf/audit/logger/EventLoggerTest.java | 266 ---------------------
 features/core/pom.xml                              |  66 +++++
 .../org/apache/karaf/itests/KarafTestSupport.java  |  61 ++++-
 itests/test/pom.xml                                |   6 +
 .../test/filtered-resources/etc/config.properties  |  13 +-
 .../org/apache/karaf/itests/features/XATest.java   |   6 +-
 jaas/modules/pom.xml                               |  66 +++++
 .../test-karaf-home/etc/config.properties          |  13 +-
 .../resources/test-karaf-home/etc/jre.properties   |   2 +
 pom.xml                                            |  71 +++++-
 scheduler/pom.xml                                  |  66 +++++
 .../service/guard/impl/GuardProxyCatalogTest.java  |   7 +-
 tooling/karaf-maven-plugin/pom.xml                 |  64 -----
 18 files changed, 437 insertions(+), 383 deletions(-)

diff --git a/assemblies/features/base/pom.xml b/assemblies/features/base/pom.xml
index bcfbd98..e81f3ab 100644
--- a/assemblies/features/base/pom.xml
+++ b/assemblies/features/base/pom.xml
@@ -37,6 +37,59 @@
     </properties>
 
     <dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>2.3.0</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-core</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>jaxb-core</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>txw2</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jsr173_api</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml</groupId>
+                                <artifactId>jsr173</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+
         <dependency>
             <groupId>org.apache.karaf.specs</groupId>
             <artifactId>org.apache.karaf.specs.locator</artifactId>
@@ -135,25 +188,26 @@
                         <configuration>
                             <artifactItems>
                                 <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.locator</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
+                                    <groupId>javax.xml.bind</groupId>
+                                    <artifactId>jaxb-api</artifactId>
+                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                 </artifactItem>
                                 <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.java.xml</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
+                                    <groupId>javax.activation</groupId>
+                                    <artifactId>activation</artifactId>
+                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                 </artifactItem>
                                 <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.java.xml.ws</artifactId>
-                                    <outputDirectory>target/classes/resources/lib/endorsed</outputDirectory>
+                                    <groupId>com.sun.xml.bind</groupId>
+                                    <artifactId>jaxb-core</artifactId>
+                                    <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                 </artifactItem>
                                 <artifactItem>
-                                    <groupId>org.apache.karaf.specs</groupId>
-                                    <artifactId>org.apache.karaf.specs.activator</artifactId>
+                                    <groupId>com.sun.xml.bind</groupId>
+                                    <artifactId>jaxb-impl</artifactId>
                                     <outputDirectory>target/classes/resources/lib/boot</outputDirectory>
                                 </artifactItem>
+               
                                 <artifactItem>
                                     <groupId>org.apache.karaf</groupId>
                                     <artifactId>org.apache.karaf.main</artifactId>
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
index c79a40b..69f9a58 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
@@ -284,11 +284,6 @@ run() {
         if [ "${ROOT_INSTANCE_RUNNING}" = "false" ] || [ "${CHECK_ROOT_INSTANCE_RUNNING}" = "false" ] ; then
             if [ "${VERSION}" -gt "8" ]; then
                 ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \
-                    --add-reads=java.xml=java.logging \
-                    --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,java.xml.ws,ALL-UNNAMED \
-                    --patch-module java.base=lib/endorsed/org.apache.karaf.specs.locator-@@project.version@@.jar \
-                    --patch-module java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-@@project.version@@.jar \
-                    --patch-module java.xml.ws=lib/endorsed/org.apache.karaf.specs.java.xml.ws-@@project.version@@.jar \
                     --add-opens java.base/java.security=ALL-UNNAMED \
                     --add-opens java.base/java.net=ALL-UNNAMED \
                     --add-opens java.base/java.lang=ALL-UNNAMED \
@@ -298,10 +293,8 @@ run() {
                     --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED \
                     --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED \
                     --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED \
-                    --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED \
                     --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED \
                     --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED \
-                    --add-modules java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws \
                     -Dkaraf.instances="${KARAF_HOME}/instances" \
                     -Dkaraf.home="${KARAF_HOME}" \
                     -Dkaraf.base="${KARAF_BASE}" \
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
index 1426918..7e8cbeb 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
+++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
@@ -122,6 +122,12 @@ equinox-capabilities= \
  osgi.service;objectClass:List<String>=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \
  osgi.service;objectClass:List<String>=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List<String>="bundleentry,bundleresource"
 
+eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0"
 eecap-10= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
  osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0", \
  osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
index d3d9898..a7ac0c5 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
+++ b/assemblies/features/base/src/main/filtered-resources/resources/etc/jre.properties
@@ -293,14 +293,6 @@ jre-1.7= \
  javax.xml.transform.stax, \
  javax.xml.transform.stream, \
  javax.xml.validation, \
- javax.xml.ws;version="2.2", \
- javax.xml.ws.handler;version="2.2", \
- javax.xml.ws.handler.soap;version="2.2", \
- javax.xml.ws.http;version="2.2", \
- javax.xml.ws.soap;version="2.2", \
- javax.xml.ws.spi;version="2.2", \
- javax.xml.ws.wsaddressing;version="2.2", \
- javax.xml.ws.spi.http;version="2.2", \
  javax.xml.xpath, \
  org.ietf.jgss, \
  org.omg.CORBA, \
@@ -550,7 +542,6 @@ jre-9= \
  javax.accessibility, \
  javax.activation;version="1.1", \
  javax.activity, \
- javax.annotation;version="1.0", \
  javax.annotation.processing;version="1.0", \
  javax.crypto, \
  javax.crypto.interfaces, \
@@ -562,8 +553,6 @@ jre-9= \
  javax.imageio.plugins.jpeg, \
  javax.imageio.spi, \
  javax.imageio.stream, \
- javax.jws, \
- javax.jws.soap, \
  javax.lang.model, \
  javax.lang.model.element, \
  javax.lang.model.type, \
@@ -643,7 +632,6 @@ jre-9= \
  javax.xml.datatype, \
  javax.xml.namespace, \
  javax.xml.parsers, \
- javax.xml.soap;version="1.3", \
  javax.xml.stream;version="1.2", \
  javax.xml.stream.events;version="1.2", \
  javax.xml.stream.util;version="1.2", \
@@ -653,14 +641,6 @@ jre-9= \
  javax.xml.transform.stax, \
  javax.xml.transform.stream, \
  javax.xml.validation, \
- javax.xml.ws;version="2.2", \
- javax.xml.ws.handler;version="2.2", \
- javax.xml.ws.handler.soap;version="2.2", \
- javax.xml.ws.http;version="2.2", \
- javax.xml.ws.soap;version="2.2", \
- javax.xml.ws.spi;version="2.2", \
- javax.xml.ws.wsaddressing;version="2.2", \
- javax.xml.ws.spi.http;version="2.2", \
  javax.xml.xpath, \
  javafx.animation, \
  javafx.application, \
@@ -744,3 +724,4 @@ jre-9= \
  org.xml.sax.helpers
 
 jre-10 = ${jre-9}
+jre-11 = ${jre-10}
diff --git a/assemblies/features/framework/src/main/feature/feature.xml b/assemblies/features/framework/src/main/feature/feature.xml
index ffd7b33..134285e 100644
--- a/assemblies/features/framework/src/main/feature/feature.xml
+++ b/assemblies/features/framework/src/main/feature/feature.xml
@@ -36,6 +36,9 @@
         <bundle start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
         <!-- features service -->
         <bundle start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
+        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.5.0</bundle>
+        <bundle start-level="20">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.11_1</bundle>
+        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.5.0</bundle>
     </feature>
 
     <feature version="${project.version}" description="Karaf core feature" name="framework-logback" hidden="true">
diff --git a/audit/src/test/java/org/apache/karaf/audit/logger/EventLoggerTest.java b/audit/src/test/java/org/apache/karaf/audit/logger/EventLoggerTest.java
deleted file mode 100644
index dee4129..0000000
--- a/audit/src/test/java/org/apache/karaf/audit/logger/EventLoggerTest.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.karaf.audit.logger;
-
-import org.apache.karaf.audit.Event;
-import org.apache.karaf.audit.EventLayout;
-import org.apache.karaf.audit.EventLogger;
-import org.apache.karaf.audit.MapEvent;
-import org.apache.karaf.audit.layout.GelfLayout;
-import org.apache.karaf.audit.layout.Rfc3164Layout;
-import org.apache.karaf.audit.layout.Rfc5424Layout;
-import org.junit.Test;
-
-import javax.management.ObjectName;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.TimeZone;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-public class EventLoggerTest {
-
-    private static final String INVOKE = "invoke";
-    private static final String[] INVOKE_SIG = new String[] {ObjectName.class.getName(), String.class.getName(), Object[].class.getName(), String[].class.getName()};
-
-    @Test
-    public void testUdp() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_JMX);
-        map.put("subtype", INVOKE);
-        map.put("method", INVOKE);
-        map.put("signature", INVOKE_SIG);
-        map.put("params", new Object[] { new ObjectName("org.apache.karaf.Mbean:type=foo"), "myMethod", new Object[] { String.class.getName() }, new String[] { "the-param "}});
-        Event event = new MapEvent(map, 1510902000000L);
-
-        int port = getNewPort();
-
-        DatagramSocket socket = new DatagramSocket(port);
-        List<DatagramPacket> packets = new ArrayList<>();
-        new Thread(() -> {
-            try {
-                DatagramPacket dp = new DatagramPacket(new byte[1024], 1024);
-                socket.receive(dp);
-                packets.add(dp);
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-
-        }).start();
-
-        Thread.sleep(100);
-
-        EventLayout layout = new Rfc3164Layout(16, 5, Rfc5424Layout.DEFAULT_ENTERPRISE_NUMBER, TimeZone.getTimeZone("GMT+01:00"), Locale.ENGLISH);
-        EventLogger logger = new UdpEventLogger("localhost", port, "UTF-8", layout);
-        logger.write(event);
-
-        Thread.sleep(100);
-
-        assertEquals(1, packets.size());
-        DatagramPacket p = packets.get(0);
-        String str = new String(p.getData(), 0, p.getLength(), StandardCharsets.UTF_8);
-        assertTrue(str.startsWith("<133>Nov 17 08:00:00 "));
-        assertTrue(str.endsWith(" jmx [jmx@18060 type=\"jmx\" subtype=\"invoke\" method=\"invoke\" signature=\"[javax.management.ObjectName, java.lang.String, [Ljava.lang.Object;, [Ljava.lang.String;\\]\" params=\"[org.apache.karaf.Mbean:type=foo, myMethod, [java.lang.String\\], [the-param \\]\\]\"]"));
-        System.out.println(str);
-    }
-
-    @Test
-    public void testTcp() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_JMX);
-        map.put("subtype", INVOKE);
-        map.put("method", INVOKE);
-        map.put("signature", INVOKE_SIG);
-        map.put("params", new Object[] { new ObjectName("org.apache.karaf.Mbean:type=foo"), "myMethod", new Object[] { String.class.getName() }, new String[] { "the-param "}});
-        Event event = new MapEvent(map, 1510902000000L);
-
-        int port = getNewPort();
-
-        List<String> packets = new ArrayList<>();
-        new Thread(() -> {
-            try (ServerSocket ssocket = new ServerSocket(port)) {
-                ssocket.setReuseAddress(true);
-                try (Socket socket = ssocket.accept()) {
-                    byte[] buffer = new byte[1024];
-                    int nb = socket.getInputStream().read(buffer);
-                    packets.add(new String(buffer, 0, nb, StandardCharsets.UTF_8));
-                }
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-
-        }).start();
-
-        Thread.sleep(100);
-
-        EventLayout layout = new Rfc5424Layout(16, 5, Rfc5424Layout.DEFAULT_ENTERPRISE_NUMBER, TimeZone.getTimeZone("GMT+01:00"));
-        EventLogger logger = new TcpEventLogger("localhost", port, "UTF-8", layout);
-        logger.write(event);
-        logger.flush();
-
-        Thread.sleep(100);
-
-        assertEquals(1, packets.size());
-        String str = packets.get(0);
-        System.out.println(str);
-        assertTrue(str.startsWith("<133>1 2017-11-17T08:00:00.000+01:00 "));
-        assertTrue(str.indexOf(" jmx [jmx@18060 type=\"jmx\" subtype=\"invoke\" method=\"invoke\" signature=\"[javax.management.ObjectName, java.lang.String, [Ljava.lang.Object;, [Ljava.lang.String;\\]\" params=\"[org.apache.karaf.Mbean:type=foo, myMethod, [java.lang.String\\], [the-param \\]\\]\"]") > 0);
-    }
-
-    @Test
-    public void testFile() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_JMX);
-        map.put("subtype", INVOKE);
-        map.put("method", INVOKE);
-        map.put("signature", INVOKE_SIG);
-        map.put("params", new Object[] { new ObjectName("org.apache.karaf.Mbean:type=foo"), "myMethod", new Object[] { String.class.getName() }, new String[] { "the-param "}});
-
-        EventLayout layout = new GelfLayout();
-        Path path = Files.createTempDirectory("file-logger");
-        String file = path.resolve("file.log").toString();
-        EventLogger logger = new FileEventLogger(file, "UTF-8", "daily", 2, false, Executors.defaultThreadFactory(), layout);
-
-        logger.write(new MapEvent(map, 1510902000000L));
-        logger.write(new MapEvent(map, 1510984800000L));
-        logger.close();
-
-        Thread.sleep(100);
-
-        List<Path> paths = Files.list(path).sorted().collect(Collectors.toList());
-        Collections.sort(paths);
-        assertEquals(2, paths.size());
-        assertEquals("file-2017-11-18.log", paths.get(0).getFileName().toString());
-        assertEquals("file.log", paths.get(1).getFileName().toString());
-
-        List<String> lines = Files.readAllLines(paths.get(0), StandardCharsets.UTF_8);
-        assertEquals(1, lines.size());
-        String str = lines.get(0);
-        System.out.println(str);
-        assertTrue(str.startsWith("{ version=\"1.1\" host=\""));
-        assertTrue(str.endsWith("timestamp=1510902000.000 short_message=\"jmx.invoke\" _type=\"jmx\" _subtype=\"invoke\" _method=\"invoke\" _signature=\"[javax.management.ObjectName, java.lang.String, [Ljava.lang.Object;, [Ljava.lang.String;]\" _params=\"[org.apache.karaf.Mbean:type=foo, myMethod, [java.lang.String], [the-param ]]\" }"));
-
-        lines = Files.readAllLines(paths.get(1), StandardCharsets.UTF_8);
-        assertEquals(1, lines.size());
-        str = lines.get(0);
-        System.out.println(str);
-        assertTrue(str.startsWith("{ version=\"1.1\" host=\""));
-        assertTrue(str.endsWith("timestamp=1510984800.000 short_message=\"jmx.invoke\" _type=\"jmx\" _subtype=\"invoke\" _method=\"invoke\" _signature=\"[javax.management.ObjectName, java.lang.String, [Ljava.lang.Object;, [Ljava.lang.String;]\" _params=\"[org.apache.karaf.Mbean:type=foo, myMethod, [java.lang.String], [the-param ]]\" }"));
-    }
-
-    @Test
-    public void testFileMaxFiles() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_SHELL);
-        map.put("subtype", "executed");
-        map.put("script", "a-script");
-
-        EventLayout layout = new GelfLayout();
-        Path path = Files.createTempDirectory("file-logger");
-        String file = path.resolve("file.log").toString();
-        EventLogger logger = new FileEventLogger(file, "UTF-8", "daily", 2, false, Executors.defaultThreadFactory(), layout);
-
-        for (int i = 0; i < 10; i++) {
-            logger.write(new MapEvent(map, 1510902000000L + TimeUnit.DAYS.toMillis(i)));
-        }
-        logger.close();
-
-        Thread.sleep(100);
-
-        List<String> paths = Files.list(path)
-                .map(Path::getFileName).map(Path::toString)
-                .sorted().collect(Collectors.toList());
-        assertEquals(Arrays.asList("file-2017-11-25.log", "file-2017-11-26.log", "file.log"), paths);
-    }
-
-    @Test
-    public void testFileSize() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_SHELL);
-        map.put("subtype", "executed");
-        map.put("script", "a-script");
-
-        EventLayout layout = new GelfLayout();
-        Path path = Files.createTempDirectory("file-logger");
-        String file = path.resolve("file.log").toString();
-        EventLogger logger = new FileEventLogger(file, "UTF-8", "size(10)", 2, false, Executors.defaultThreadFactory(), layout);
-
-        for (int i = 0; i < 10; i++) {
-            logger.write(new MapEvent(map, 1510902000000L + TimeUnit.HOURS.toMillis(i)));
-        }
-        logger.close();
-
-        Thread.sleep(100);
-
-        List<String> paths = Files.list(path)
-                .map(Path::getFileName).map(Path::toString)
-                .sorted().collect(Collectors.toList());
-        assertEquals(Arrays.asList("file-2017-11-17-2.log", "file-2017-11-17.log", "file.log"), paths);
-    }
-
-    @Test
-    public void testFileSizeCompress() throws Exception {
-        Map<String, Object> map = new HashMap<>();
-        map.put("type", Event.TYPE_SHELL);
-        map.put("subtype", "executed");
-        map.put("script", "a-script");
-
-        EventLayout layout = new GelfLayout();
-        Path path = Files.createTempDirectory("file-logger");
-        String file = path.resolve("file.log").toString();
-        EventLogger logger = new FileEventLogger(file, "UTF-8", "size(10)", 2, true, Executors.defaultThreadFactory(), layout);
-
-        for (int i = 0; i < 10; i++) {
-            logger.write(new MapEvent(map, 1510902000000L + TimeUnit.HOURS.toMillis(i)));
-        }
-        logger.close();
-
-        Thread.sleep(100);
-
-        List<String> paths = Files.list(path)
-                .map(Path::getFileName).map(Path::toString)
-                .sorted().collect(Collectors.toList());
-        assertEquals(Arrays.asList("file-2017-11-17-2.log.gz", "file-2017-11-17.log.gz", "file.log"), paths);
-    }
-
-    private int getNewPort() throws IOException {
-        try (ServerSocket socket = new ServerSocket()) {
-            socket.setReuseAddress(true);
-            socket.bind(new InetSocketAddress("localhost", 0));
-            return socket.getLocalPort();
-        }
-    }
-
-}
diff --git a/features/core/pom.xml b/features/core/pom.xml
index 9b585e2..f94a1df 100644
--- a/features/core/pom.xml
+++ b/features/core/pom.xml
@@ -187,5 +187,71 @@
             </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+	        <id>java9-plus</id>
+	        <properties>
+                <plexus-utils.version>3.1.0</plexus-utils.version>
+                <mvn.opts>--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED -Djava.io.tmpdir=${project.build.directory}</mvn.opts>
+	        </properties>
+                <dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                         <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-core</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>jaxb-core</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>txw2</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jsr173_api</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml</groupId>
+                                <artifactId>jsr173</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
+	        <activation>
+        	    <jdk>[9,)</jdk>
+            </activation>
+	</profile>
+    </profiles>
 
 </project>
diff --git a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
index f31cc2a..150ae67 100644
--- a/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -57,9 +57,11 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
 import org.ops4j.pax.exam.*;
+import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
 import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
 import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
 import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
+import org.ops4j.pax.exam.options.extra.VMOption;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -179,7 +181,60 @@ public class KarafTestSupport {
             localRepository = "";
         }
 
-        return new Option[]{
+        if (JavaVersionUtil.getMajorVersion() >= 9) {
+
+            return new Option[]{
+                //debugConfiguration("8889", true),
+                KarafDistributionOption.karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
+                // enable JMX RBAC security, thanks to the KarafMBeanServerBuilder
+                KarafDistributionOption.configureSecurity().disableKarafMBeanServerBuilder(),
+                KarafDistributionOption.configureConsole().ignoreLocalConsole(),
+                KarafDistributionOption.keepRuntimeFolder(),
+                KarafDistributionOption.logLevel(LogLevel.INFO),
+                CoreOptions.mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
+                CoreOptions.mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
+                CoreOptions.mavenBundle().groupId("org.apache.karaf.itests").artifactId("common").versionAsInProject(),
+                CoreOptions.mavenBundle().groupId("javax.annotation").artifactId("javax.annotation-api").versionAsInProject(),
+                KarafDistributionOption.replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", getConfigFile("/etc/org.ops4j.pax.logging.cfg")),
+                //replaceConfigurationFile("etc/host.key", getConfigFile("/etc/host.key")),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "updateSnapshots", "none"),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort),
+                KarafDistributionOption.editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.localRepository", localRepository),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring31.version", System.getProperty("spring31.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring32.version", System.getProperty("spring32.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring40.version", System.getProperty("spring40.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring41.version", System.getProperty("spring41.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring42.version", System.getProperty("spring42.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring43.version", System.getProperty("spring43.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring50.version", System.getProperty("spring50.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring.security31.version", System.getProperty("spring.security31.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "spring.security42.version", System.getProperty("spring.security42.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "activemq.version", System.getProperty("activemq.version")),
+                KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner
+                KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", ""),
+                new VMOption("--add-opens"),
+                new VMOption("java.base/java.security=ALL-UNNAMED"),
+                new VMOption("--add-opens"),
+                new VMOption("java.base/java.net=ALL-UNNAMED"),
+                new VMOption("--add-opens"),
+                new VMOption("java.base/java.lang=ALL-UNNAMED"),
+                new VMOption("--add-opens"),
+                new VMOption("java.base/java.util=ALL-UNNAMED"),
+                new VMOption("--add-opens"),
+                new VMOption("java.naming/javax.naming.spi=ALL-UNNAMED"),
+                new VMOption("--add-opens"),
+                new VMOption("java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED"),
+                new VMOption("--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED"),
+                new VMOption("--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED"),
+                new VMOption("--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED"),
+                new VMOption("--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED")
+            };
+        } else {
+                
+            return new Option[]{
                 //debugConfiguration("8889", true),
                 KarafDistributionOption.karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")),
                 // enable JMX RBAC security, thanks to the KarafMBeanServerBuilder
@@ -210,7 +265,9 @@ public class KarafTestSupport {
                 KarafDistributionOption.editConfigurationFilePut("etc/system.properties", "activemq.version", System.getProperty("activemq.version")),
                 KarafDistributionOption.editConfigurationFilePut("etc/branding.properties", "welcome", ""), // No welcome banner
                 KarafDistributionOption.editConfigurationFilePut("etc/branding-ssh.properties", "welcome", "")
-        };
+            };  
+                                
+        }
     }
 
     public static int getAvailablePort(int min, int max) {
diff --git a/itests/test/pom.xml b/itests/test/pom.xml
index 3d6623a..4aa45fe 100644
--- a/itests/test/pom.xml
+++ b/itests/test/pom.xml
@@ -45,6 +45,12 @@
         </dependency>
 
         <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>${javax.annotation.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
             <artifactId>pax-exam-container-karaf</artifactId>
             <scope>compile</scope>
diff --git a/itests/test/src/test/filtered-resources/etc/config.properties b/itests/test/src/test/filtered-resources/etc/config.properties
index 723b46d..2a9e2ef 100644
--- a/itests/test/src/test/filtered-resources/etc/config.properties
+++ b/itests/test/src/test/filtered-resources/etc/config.properties
@@ -98,7 +98,18 @@ org.osgi.framework.system.capabilities= \
  osgi.service;effective:=active;objectClass=org.osgi.service.resolver.Resolver, \
  osgi.service;effective:=active;objectClass=org.osgi.service.startlevel.StartLevel, \
  osgi.service;effective:=active;objectClass=org.osgi.service.url.URLHandlers
-
+eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0"
+eecap-10= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0"
 eecap-9= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
  osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9"
 eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/features/XATest.java b/itests/test/src/test/java/org/apache/karaf/itests/features/XATest.java
index af4180d..b8fe5b3 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/features/XATest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/features/XATest.java
@@ -20,6 +20,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
 import org.ops4j.pax.exam.MavenUtils;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -59,8 +60,8 @@ public class XATest extends KarafTestSupport {
         result.add(replaceConfigurationFile("etc/org.ops4j.connectionfactory-artemis.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.connectionfactory-artemis.cfg")));
         result.add(replaceConfigurationFile("etc/org.ops4j.datasource-derby.cfg", getConfigFile("/org/apache/karaf/itests/features/org.ops4j.datasource-derby.cfg")));
         result.add(replaceConfigurationFile("etc/xa-test-camel.xml", getConfigFile("/org/apache/karaf/itests/features/xa-test-camel.xml")));
-        if (System.getProperty("java.version").startsWith("9")) {
-            //need asm 6.x which support java9 to run this test
+        if (JavaVersionUtil.getMajorVersion() >= 9) {
+            //need asm 6.x which support java9plus to run this test
             result.add(replaceConfigurationFile("system/org/apache/karaf/features/standard/" 
                 + version + "/standard-" + version + "-features.xml", 
                 getConfigFile("/etc/feature.xml")));
@@ -74,6 +75,7 @@ public class XATest extends KarafTestSupport {
 
         System.out.println("== Installing Artemis");
         featureService.installFeature("artemis", NO_AUTO_REFRESH);
+        Thread.sleep(15000);//sleep a while ensure the jms broker is up
         featureService.installFeature("jms", NO_AUTO_REFRESH);
         featureService.installFeature("pax-jms-artemis", NO_AUTO_REFRESH);
 
diff --git a/jaas/modules/pom.xml b/jaas/modules/pom.xml
index 5d760fc..ac152e8 100644
--- a/jaas/modules/pom.xml
+++ b/jaas/modules/pom.xml
@@ -180,4 +180,70 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+	        <id>java9-plus</id>
+	        <properties>
+                <plexus-utils.version>3.1.0</plexus-utils.version>
+                <mvn.opts>--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-modules java.activation,java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws -Djava.io.tmpdir=${project.build.directory}</mvn.opts>
+	        </properties>
+                <dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-core</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>jaxb-core</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>txw2</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jsr173_api</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml</groupId>
+                                <artifactId>jsr173</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
+	        <activation>
+        	    <jdk>[9,)</jdk>
+            </activation>
+	</profile>
+    </profiles>
 </project>
diff --git a/main/src/test/resources/test-karaf-home/etc/config.properties b/main/src/test/resources/test-karaf-home/etc/config.properties
index c30059b..0684090 100755
--- a/main/src/test/resources/test-karaf-home/etc/config.properties
+++ b/main/src/test/resources/test-karaf-home/etc/config.properties
@@ -64,7 +64,18 @@ org.osgi.framework.system.packages= \
 
 org.osgi.framework.system.capabilities= \
  ${eecap-${java.specification.version}}
-
+eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0,11.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0,11.0"
+eecap-10= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8,9.0,10.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8,9.0,10.0"
 eecap-9= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
  osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9"
 eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0,1.1,1.2", \
diff --git a/main/src/test/resources/test-karaf-home/etc/jre.properties b/main/src/test/resources/test-karaf-home/etc/jre.properties
index 3bc13ec..512a06b 100644
--- a/main/src/test/resources/test-karaf-home/etc/jre.properties
+++ b/main/src/test/resources/test-karaf-home/etc/jre.properties
@@ -736,3 +736,5 @@ jre-9= \
  org.xml.sax, \
  org.xml.sax.ext, \
  org.xml.sax.helpers
+jre-10 = ${jre-9}
+jre-11 = ${jre-10}
diff --git a/pom.xml b/pom.xml
index e6b3cc3..9d42419 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,6 +146,7 @@
         <ant.bundle.version>1.9.7_1</ant.bundle.version>
         <antlr.bundle.version>2.7.7_5</antlr.bundle.version>
         <asm.version>6.2</asm.version>
+        <javax.annotation.version>1.2</javax.annotation.version>
         <awaitility.version>3.1.0</awaitility.version>
         <cglib.bundle.version>3.2.4_1</cglib.bundle.version>
         <cglib2.version>2.2.0</cglib2.version>
@@ -178,7 +179,7 @@
         <geronimo.jpa-spec.version>1.1</geronimo.jpa-spec.version>
         <geronimo.jta-spec.version>1.1.1</geronimo.jta-spec.version>
 
-        <easymock.version>3.6</easymock.version>
+        <easymock.version>3.7-SNAPSHOT</easymock.version>
         <objenesis.version>2.6</objenesis.version>
         <equinox.groupId>org.eclipse.platform</equinox.groupId>
         <equinox.artifactId>org.eclipse.osgi</equinox.artifactId>
@@ -272,7 +273,7 @@
         <osgi.compendium.version>5.0.0</osgi.compendium.version>
 
         <pax.cdi.version>1.0.0</pax.cdi.version>
-        <pax.exam.version>4.11.0</pax.exam.version>
+        <pax.exam.version>4.12.0-SNAPSHOT</pax.exam.version>
         <pax.logging.version>1.10.1</pax.logging.version>
         <pax.base.version>1.5.0</pax.base.version>
         <pax.swissbox.version>1.8.3</pax.swissbox.version>
@@ -301,7 +302,7 @@
         <derby-version>10.12.1.1</derby-version>
         <directory-version>2.0.0-M24</directory-version>
         <struts.bundle.version>1.3.10_1</struts.bundle.version>
-        <xbean.version>4.8</xbean.version>
+        <xbean.version>4.9</xbean.version>
         <xerces.version>2.11.0_1</xerces.version>
         <xalan.bundle.version>2.7.2_3</xalan.bundle.version>
         <xalan-serializer.bundle.version>2.7.2_1</xalan-serializer.bundle.version>
@@ -2376,20 +2377,74 @@
             </properties>
         </profile>
         <profile>
-            <id>java9</id>
+            <id>java9-plus</id>
             <properties>
-                <easymock.version>3.5</easymock.version>
-                <surefire.argLine>--add-opens java.base/java.security=ALL-UNNAMED
+                <surefire.argLine>
+                                  --add-opens java.base/java.security=ALL-UNNAMED
                                   --add-opens java.base/java.net=ALL-UNNAMED 
                                   --add-opens java.base/java.lang=ALL-UNNAMED
                                   --add-opens java.base/java.util=ALL-UNNAMED
                                   --add-opens java.naming/javax.naming.spi=ALL-UNNAMED
                                   --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED
-                                  --add-modules java.activation,java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws</surefire.argLine>
+                </surefire.argLine>
             </properties>
             <activation>
-                <jdk>9</jdk>
+                <jdk>[9,)</jdk>
             </activation>
+            <!--dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>2.3.0</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-core</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>jaxb-core</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>txw2</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jsr173_api</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml</groupId>
+                                <artifactId>jsr173</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies-->
         </profile>
     </profiles>
 </project>
diff --git a/scheduler/pom.xml b/scheduler/pom.xml
index 080f9fb..d97b0f5 100644
--- a/scheduler/pom.xml
+++ b/scheduler/pom.xml
@@ -124,5 +124,71 @@
             <optional>true</optional>
         </dependency>
     </dependencies>
+    <profiles>
+        <profile>
+	        <id>java9-plus</id>
+	        <properties>
+                <plexus-utils.version>3.1.0</plexus-utils.version>
+                <mvn.opts>--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-modules java.activation,java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws -Djava.io.tmpdir=${project.build.directory}</mvn.opts>
+	        </properties>
+                <dependencies>
+                    <dependency>
+                        <groupId>javax.xml.bind</groupId>
+                        <artifactId>jaxb-api</artifactId>
+                        <version>${jaxb.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-core</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>jaxb-core</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish.jaxb</groupId>
+                                <artifactId>txw2</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>${jaxb.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jsr173_api</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml</groupId>
+                                <artifactId>jsr173</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>activation</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
+	        <activation>
+        	    <jdk>[9,)</jdk>
+            </activation>
+	</profile>
+    </profiles>
 
 </project>
diff --git a/service/guard/src/test/java/org/apache/karaf/service/guard/impl/GuardProxyCatalogTest.java b/service/guard/src/test/java/org/apache/karaf/service/guard/impl/GuardProxyCatalogTest.java
index 1385ac4..7538638 100644
--- a/service/guard/src/test/java/org/apache/karaf/service/guard/impl/GuardProxyCatalogTest.java
+++ b/service/guard/src/test/java/org/apache/karaf/service/guard/impl/GuardProxyCatalogTest.java
@@ -1308,7 +1308,12 @@ public class GuardProxyCatalogTest {
 
         // Test that the actual proxy invokes the original service...
         ServiceFactory proxyServiceSF = (ServiceFactory) serviceMap.get(proxySR);
-        Object proxyService = proxyServiceSF.getService(clientBundle, null);
+        Object proxyService = null;
+        try {
+            proxyService = proxyServiceSF.getService(clientBundle, null);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
         assertNotSame("The proxy should not be the same object as the original service", testService, proxyService);
 
         return proxyService;
diff --git a/tooling/karaf-maven-plugin/pom.xml b/tooling/karaf-maven-plugin/pom.xml
index 2872122..cea70c3 100644
--- a/tooling/karaf-maven-plugin/pom.xml
+++ b/tooling/karaf-maven-plugin/pom.xml
@@ -392,70 +392,6 @@
     </reporting>
     <profiles>
         <profile>
-	        <id>java9</id>
-	        <properties>
-                <plexus-utils.version>3.1.0</plexus-utils.version>
-                <mvn.opts>--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-modules java.activation,java.xml.ws.annotation,java.corba,java.transaction,java.xml.bind,java.xml.ws -Djava.io.tmpdir=${project.build.directory}</mvn.opts>
-	        </properties>
-                <dependencies>
-                    <dependency>
-                        <groupId>javax.xml.bind</groupId>
-                        <artifactId>jaxb-api</artifactId>
-                        <version>2.3.0</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>javax.activation</groupId>
-                        <artifactId>activation</artifactId>
-                        <version>1.1.1</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>com.sun.xml.bind</groupId>
-                        <artifactId>jaxb-core</artifactId>
-                        <version>${jaxb.version}</version>
-                        <exclusions>
-                            <exclusion>
-                                <groupId>org.glassfish.jaxb</groupId>
-                                <artifactId>jaxb-core</artifactId>
-                            </exclusion>
-                            <exclusion>
-                                <groupId>org.glassfish.jaxb</groupId>
-                                <artifactId>txw2</artifactId>
-                            </exclusion>
-                        </exclusions>
-                    </dependency>
-                    <dependency>
-                        <groupId>com.sun.xml.bind</groupId>
-                        <artifactId>jaxb-impl</artifactId>
-                        <version>${jaxb.version}</version>
-                        <exclusions>
-                            <exclusion>
-                                <groupId>javax.xml.bind</groupId>
-                                <artifactId>jsr173_api</artifactId>
-                            </exclusion>
-                            <exclusion>
-                                <groupId>javax.xml</groupId>
-                                <artifactId>jsr173</artifactId>
-                            </exclusion>
-                            <exclusion>
-                                <groupId>javax.activation</groupId>
-                                <artifactId>activation</artifactId>
-                            </exclusion>
-                            <exclusion>
-                                <groupId>javax.xml.bind</groupId>
-                                <artifactId>activation</artifactId>
-                            </exclusion>
-                            <exclusion>
-                                <groupId>javax.xml.bind</groupId>
-                                <artifactId>jaxb-api</artifactId>
-                            </exclusion>
-                        </exclusions>
-                    </dependency>
-                </dependencies>
-	        <activation>
-        	    <jdk>9</jdk>
-            </activation>
-	</profile>
-        <profile>
             <id>skiptests</id>
             <properties>
                 <invoker.skip>true</invoker.skip>