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/cxf.git
The following commit(s) were added to refs/heads/master by this push: new e00fb55 [CXF-8189]be able to set maven-compiler-plugin source/target version seperately for different JDK e00fb55 is described below commit e00fb55e8e08c25149fee72957ad8fbdaa3738f1 Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Thu Jan 9 16:00:45 2020 -0500 [CXF-8189]be able to set maven-compiler-plugin source/target version seperately for different JDK --- .../org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java | 14 +++++++++++++- .../org/apache/cxf/osgi/itests/soap/HttpServiceTest.java | 14 +++++++++++++- .../org/apache/cxf/osgi/itests/soap/JmsServiceTest.java | 13 ++++++++++++- osgi/karaf/features/pom.xml | 2 +- parent/pom.xml | 1 + 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java index 5f1ce8b..51bde18 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java @@ -26,6 +26,7 @@ import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import org.apache.cxf.helpers.JavaUtils; import org.apache.cxf.osgi.itests.AbstractServerActivator; import org.apache.cxf.osgi.itests.CXFOSGiTestSupport; import org.osgi.framework.Constants; @@ -112,13 +113,24 @@ public class JaxRsServiceTest extends CXFOSGiTestSupport { } private static InputStream serviceBundle() { - return TinyBundles.bundle() + if (JavaUtils.isJava11Compatible()) { + return TinyBundles.bundle() .add(AbstractServerActivator.class) .add(JaxRsTestActivator.class) .add(Book.class) .add(BookStore.class) .set(Constants.BUNDLE_ACTIVATOR, JaxRsTestActivator.class.getName()) + .set("Require-Capability", "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version=11))\"") .build(TinyBundles.withBnd()); + } else { + return TinyBundles.bundle() + .add(AbstractServerActivator.class) + .add(JaxRsTestActivator.class) + .add(Book.class) + .add(BookStore.class) + .set(Constants.BUNDLE_ACTIVATOR, JaxRsTestActivator.class.getName()) + .build(TinyBundles.withBnd()); + } } } diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/HttpServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/HttpServiceTest.java index c63f165..ab534fe 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/HttpServiceTest.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/HttpServiceTest.java @@ -20,6 +20,7 @@ package org.apache.cxf.osgi.itests.soap; import java.io.InputStream; +import org.apache.cxf.helpers.JavaUtils; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.osgi.itests.AbstractServerActivator; import org.apache.cxf.osgi.itests.CXFOSGiTestSupport; @@ -77,13 +78,24 @@ public class HttpServiceTest extends CXFOSGiTestSupport { } private static InputStream serviceBundle() { - return TinyBundles.bundle() + if (JavaUtils.isJava11Compatible()) { + return TinyBundles.bundle() .add(AbstractServerActivator.class) .add(HttpTestActivator.class) .add(Greeter.class) .add(GreeterImpl.class) .set(Constants.BUNDLE_ACTIVATOR, HttpTestActivator.class.getName()) + .set("Require-Capability", "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version=11))\"") .build(TinyBundles.withBnd()); + } else { + return TinyBundles.bundle() + .add(AbstractServerActivator.class) + .add(HttpTestActivator.class) + .add(Greeter.class) + .add(GreeterImpl.class) + .set(Constants.BUNDLE_ACTIVATOR, HttpTestActivator.class.getName()) + .build(TinyBundles.withBnd()); + } } } diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/JmsServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/JmsServiceTest.java index 2f6e552..fbec6a8 100644 --- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/JmsServiceTest.java +++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/soap/JmsServiceTest.java @@ -24,6 +24,7 @@ import java.util.Collections; import javax.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.cxf.helpers.JavaUtils; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.osgi.itests.CXFOSGiTestSupport; import org.apache.cxf.transport.jms.ConnectionFactoryFeature; @@ -82,12 +83,22 @@ public class JmsServiceTest extends CXFOSGiTestSupport { } private static InputStream serviceBundle() { - return TinyBundles.bundle() + if (JavaUtils.isJava11Compatible()) { + return TinyBundles.bundle() .add(JmsTestActivator.class) .add(Greeter.class) .add(GreeterImpl.class) .set(Constants.BUNDLE_ACTIVATOR, JmsTestActivator.class.getName()) + .set("Require-Capability", "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version=11))\"") .build(TinyBundles.withBnd()); + } else { + return TinyBundles.bundle() + .add(JmsTestActivator.class) + .add(Greeter.class) + .add(GreeterImpl.class) + .set(Constants.BUNDLE_ACTIVATOR, JmsTestActivator.class.getName()) + .build(TinyBundles.withBnd()); + } } } diff --git a/osgi/karaf/features/pom.xml b/osgi/karaf/features/pom.xml index 4829175..efd646d 100644 --- a/osgi/karaf/features/pom.xml +++ b/osgi/karaf/features/pom.xml @@ -179,7 +179,7 @@ <descriptor>file:${project.build.directory}/classes/features.xml</descriptor> </descriptors> <distribution>org.apache.karaf.features:framework</distribution> - <javase>9</javase> + <javase>11</javase> <framework> <feature>framework</feature> </framework> diff --git a/parent/pom.xml b/parent/pom.xml index 1780e61..d4b40a2 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -2819,6 +2819,7 @@ <id>java9-plus</id> <properties> <org.apache.cxf.transport.websocket.atmosphere.disabled>true</org.apache.cxf.transport.websocket.atmosphere.disabled> + <cxf.jdk.version>11</cxf.jdk.version> </properties> <activation> <jdk>[9,)</jdk>