diff --git a/api/payara-bom/pom.xml b/api/payara-bom/pom.xml index 5c7cdd78981..a9361dbfdcc 100644 --- a/api/payara-bom/pom.xml +++ b/api/payara-bom/pom.xml @@ -1,7 +1,7 @@ + org.osgi + osgi.annotation + ${osgi.version} + provided + + + org.osgi org.osgi.dto - 1.1.0 + ${osgi.dto.version} org.codehaus.woodstox diff --git a/appserver/extras/embedded/common/bootstrap/pom.xml b/appserver/extras/embedded/common/bootstrap/pom.xml index 965bfc37cc5..b71944ae136 100644 --- a/appserver/extras/embedded/common/bootstrap/pom.xml +++ b/appserver/extras/embedded/common/bootstrap/pom.xml @@ -40,7 +40,7 @@ * holder. */ --> - + @@ -97,12 +97,12 @@ org.osgi - org.osgi.core + osgi.core provided org.osgi - org.osgi.compendium + osgi.cmpn provided diff --git a/appserver/extras/embedded/common/installroot-builder/pom.xml b/appserver/extras/embedded/common/installroot-builder/pom.xml index a7b671aceda..67976d8f579 100644 --- a/appserver/extras/embedded/common/installroot-builder/pom.xml +++ b/appserver/extras/embedded/common/installroot-builder/pom.xml @@ -39,7 +39,8 @@ * only if the new code is made subject to such option by the copyright * holder. */ ---> +--> + 4.0.0 @@ -86,7 +87,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/appserver/extras/embedded/common/instanceroot-builder/pom.xml b/appserver/extras/embedded/common/instanceroot-builder/pom.xml index ab4b5088fe0..c8a4d06c758 100644 --- a/appserver/extras/embedded/common/instanceroot-builder/pom.xml +++ b/appserver/extras/embedded/common/instanceroot-builder/pom.xml @@ -39,8 +39,8 @@ * only if the new code is made subject to such option by the copyright * holder. */ ---> - +--> + 4.0.0 @@ -87,7 +87,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/appserver/extras/embedded/common/osgi-main/pom.xml b/appserver/extras/embedded/common/osgi-main/pom.xml index 4bc9fa5e414..c77fa36dbb2 100644 --- a/appserver/extras/embedded/common/osgi-main/pom.xml +++ b/appserver/extras/embedded/common/osgi-main/pom.xml @@ -39,8 +39,8 @@ * only if the new code is made subject to such option by the copyright * holder. */ ---> - +--> + 4.0.0 @@ -58,7 +58,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/appserver/extras/embedded/common/osgi-modules-uninstaller/pom.xml b/appserver/extras/embedded/common/osgi-modules-uninstaller/pom.xml index 9365c07a5b0..bfadbd1c392 100644 --- a/appserver/extras/embedded/common/osgi-modules-uninstaller/pom.xml +++ b/appserver/extras/embedded/common/osgi-modules-uninstaller/pom.xml @@ -39,7 +39,8 @@ and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder. ---> +--> + 4.0.0 @@ -57,7 +58,7 @@ holder. org.osgi - org.osgi.core + osgi.core provided diff --git a/appserver/osgi-platforms/felix-webconsole-extension/pom.xml b/appserver/osgi-platforms/felix-webconsole-extension/pom.xml index 6266de956bb..2d729316669 100644 --- a/appserver/osgi-platforms/felix-webconsole-extension/pom.xml +++ b/appserver/osgi-platforms/felix-webconsole-extension/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -79,11 +79,11 @@ org.osgi - org.osgi.core + osgi.core org.osgi - org.osgi.compendium + osgi.cmpn org.apache.felix diff --git a/appserver/web/web-core/pom.xml b/appserver/web/web-core/pom.xml index ce24cded678..aee23550899 100755 --- a/appserver/web/web-core/pom.xml +++ b/appserver/web/web-core/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -150,7 +150,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/appserver/web/web-naming/pom.xml b/appserver/web/web-naming/pom.xml index 526fd67a345..a9161516b1c 100755 --- a/appserver/web/web-naming/pom.xml +++ b/appserver/web/web-naming/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -89,13 +89,12 @@ org.osgi - org.osgi.core + osgi.core provided org.osgi - org.osgi.annotation - 6.0.0 + osgi.annotation provided diff --git a/appserver/web/web-naming/src/main/java/org/apache/naming/resources/DirContextURLStreamHandlerService.java b/appserver/web/web-naming/src/main/java/org/apache/naming/resources/DirContextURLStreamHandlerService.java index 91b719cf812..ae12ea2516f 100644 --- a/appserver/web/web-naming/src/main/java/org/apache/naming/resources/DirContextURLStreamHandlerService.java +++ b/appserver/web/web-naming/src/main/java/org/apache/naming/resources/DirContextURLStreamHandlerService.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2017] [Payara Foundation and/or its affiliates] +// Portions Copyright [2017-2021] [Payara Foundation and/or its affiliates] package org.apache.naming.resources; @@ -46,6 +46,7 @@ import java.io.IOException; import java.net.URL; import java.net.URLConnection; +import java.util.Dictionary; import java.util.Hashtable; import java.util.Properties; @@ -97,13 +98,13 @@ public String toExternalForm(URL u) { @SuppressWarnings({ "unchecked", "rawtypes" }) public void start(BundleContext context) throws Exception { - Properties properties = new Properties(); + Dictionary properties = new Properties(); properties.put(URL_HANDLER_PROTOCOL, new String[] { "jndi" }); context.registerService( URLStreamHandlerService.class.getName(), this, - (Hashtable) properties); + properties); } public void stop(BundleContext context) throws Exception { diff --git a/appserver/web/weld-integration/pom.xml b/appserver/web/weld-integration/pom.xml index 11464259a63..826a0bbe256 100644 --- a/appserver/web/weld-integration/pom.xml +++ b/appserver/web/weld-integration/pom.xml @@ -184,7 +184,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/nucleus/admin/rest/rest-service/pom.xml b/nucleus/admin/rest/rest-service/pom.xml index 51a1bd4f6ea..239f251eb2e 100644 --- a/nucleus/admin/rest/rest-service/pom.xml +++ b/nucleus/admin/rest/rest-service/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -148,7 +148,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/nucleus/common/common-util/pom.xml b/nucleus/common/common-util/pom.xml index c606afa61c4..de094e7efe4 100755 --- a/nucleus/common/common-util/pom.xml +++ b/nucleus/common/common-util/pom.xml @@ -40,7 +40,7 @@ holder. --> - + @@ -113,13 +113,13 @@ org.osgi - org.osgi.core + osgi.core provided org.osgi - org.osgi.enterprise + osgi.enterprise provided diff --git a/nucleus/core/bootstrap/pom.xml b/nucleus/core/bootstrap/pom.xml index 53d13c97de8..1bacc5b082b 100755 --- a/nucleus/core/bootstrap/pom.xml +++ b/nucleus/core/bootstrap/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -132,12 +132,12 @@ org.osgi - org.osgi.core + osgi.core provided org.osgi - org.osgi.compendium + osgi.cmpn provided diff --git a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java index 1ff7a16955b..b4423a208de 100644 --- a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java +++ b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2017-2018] [Payara Foundation and/or its affiliates] +// Portions Copyright [2017-2021] [Payara Foundation and/or its affiliates] package com.sun.enterprise.glassfish.bootstrap.osgi; @@ -754,8 +754,10 @@ public static void main(String[] args) throws Exception { long t0 = System.currentTimeMillis(); Framework framework = null; + Map mm = new HashMap<>(); + props.putAll(mm); for (FrameworkFactory frameworkFactory : ServiceLoader.load(FrameworkFactory.class)) { - framework = frameworkFactory.newFramework((Hashtable)props); + framework = frameworkFactory.newFramework(mm); System.out.println("framework = " + framework); break; } diff --git a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java index 5b71038461a..5e1133bf197 100644 --- a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java +++ b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2017] [Payara Foundation and/or its affiliates] +// Portions Copyright [2017-2021] [Payara Foundation and/or its affiliates] package com.sun.enterprise.glassfish.bootstrap.osgi; @@ -45,7 +45,9 @@ import static com.sun.enterprise.glassfish.bootstrap.Constants.BUILDER_NAME_PROPERTY; import static com.sun.enterprise.glassfish.bootstrap.Constants.PLATFORM_PROPERTY_KEY; +import java.util.Dictionary; import java.util.Hashtable; +import java.util.Properties; import org.glassfish.embeddable.BootstrapProperties; import org.glassfish.embeddable.GlassFishException; @@ -81,11 +83,13 @@ public GlassFishRuntime build(BootstrapProperties bootstrapProperties) throws Gl provisionBundles(bootstrapProperties); GlassFishRuntime glassFishRuntime = new EmbeddedOSGiGlassFishRuntime(getBundleContext()); - - getBundleContext().registerService( - GlassFishRuntime.class.getName(), - glassFishRuntime, - (Hashtable) bootstrapProperties.getProperties()); + + Properties props = bootstrapProperties.getProperties(); + Dictionary properties = new Properties(); + for (final String name: props.stringPropertyNames()) { + properties.put(name, props.getProperty(name)); + } + getBundleContext().registerService(GlassFishRuntime.class.getName(), glassFishRuntime, properties); return glassFishRuntime; } diff --git a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java index e5d0fd70f2e..7b32ef2ca9a 100644 --- a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java +++ b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -// Portions Copyright [2017] [Payara Foundation and/or its affiliates] +// Portions Copyright [2017-2021] [Payara Foundation and/or its affiliates] package com.sun.enterprise.glassfish.bootstrap.osgi; @@ -48,7 +48,9 @@ import org.osgi.framework.launch.FrameworkFactory; import org.osgi.util.tracker.ServiceTracker; +import java.util.HashMap; import java.util.Hashtable; +import java.util.Map; import java.util.Properties; import java.util.ServiceLoader; @@ -76,8 +78,12 @@ public Framework launchOSGiFrameWork() throws Exception { // Locate an OSGi framework and initialize it ServiceLoader frameworkFactories = ServiceLoader.load(FrameworkFactory.class, getClass().getClassLoader()); + Map mm = new HashMap<>(); + for (Map.Entry entry : properties.entrySet()) { + mm.put((String) entry.getKey(), (String) entry.getValue()); + } for (FrameworkFactory frameworkFactory : frameworkFactories) { - framework = frameworkFactory.newFramework((Hashtable)properties); + framework = frameworkFactory.newFramework(mm); break; } diff --git a/nucleus/flashlight/framework/pom.xml b/nucleus/flashlight/framework/pom.xml index f3f385f68d5..58be399abcc 100755 --- a/nucleus/flashlight/framework/pom.xml +++ b/nucleus/flashlight/framework/pom.xml @@ -40,7 +40,7 @@ holder. --> - + 4.0.0 @@ -107,7 +107,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/nucleus/osgi-platforms/felix/src/main/resources/config/osgi.properties b/nucleus/osgi-platforms/felix/src/main/resources/config/osgi.properties index e0b28986308..f5712ccad3e 100755 --- a/nucleus/osgi-platforms/felix/src/main/resources/config/osgi.properties +++ b/nucleus/osgi-platforms/felix/src/main/resources/config/osgi.properties @@ -66,8 +66,8 @@ # Unlike Equinox, Felix requires us to list all packages from felix.jar # while using org.osgi.framework.system.packages property. Felix.system.packages=\ - org.osgi.dto; version=1.0, \ - org.osgi.framework; version=1.8, \ + org.osgi.dto; version=1.1, \ + org.osgi.framework; version=1.9, \ org.osgi.framework.dto; version=1.8, \ org.osgi.framework.hooks.bundle; version=1.1, \ org.osgi.framework.hooks.resolver; version=1.0, \ @@ -78,14 +78,14 @@ Felix.system.packages=\ org.osgi.framework.startlevel; version=1.0, \ org.osgi.framework.startlevel.dto; version=1.0, \ org.osgi.framework.wiring; version=1.2, \ - org.osgi.framework.wiring.dto; version=1.2, \ + org.osgi.framework.wiring.dto; version=1.3, \ org.osgi.resource; version=1.0, \ org.osgi.resource.dto; version=1.0, \ org.osgi.service.packageadmin; version=1.2, \ - org.osgi.service.resolver; version=1.0, \ + org.osgi.service.resolver; version=1.1, \ org.osgi.service.startlevel; version=1.1, \ org.osgi.service.url; version=1.0, \ - org.osgi.util.tracker; version=1.5.1, \ + org.osgi.util.tracker; version=1.5.2, \ ${extra-system-packages} @@ -346,6 +346,7 @@ jre-1.6=\ javax.xml.datatype, \ javax.xml.namespace, \ javax.xml.parsers, \ + javax.xml.soap, \ javax.xml.stream; javax.xml.stream.events; javax.xml.stream.util, \ javax.xml.transform, \ javax.xml.transform.dom, \ @@ -394,7 +395,7 @@ jre-1.6=\ # TODO: We still need to add appropriate SE packages for 7 & 8. jre-1.7=${jre-1.6},com.sun.tracing jre-1.8=${jre-1.7} -jre-9=${jre-1.8} +jre-9=${jre-1.8},jdk,jdk.security,jdk.security.jarsigner jre-10=${jre-9} jre-11=\ javax.accessibility, \ @@ -498,6 +499,7 @@ jre-11=\ javax.xml.transform.stream, \ javax.xml.validation, \ javax.xml.xpath, \ + jdk, \ jdk.jfr, \ jdk.jfr.consumer, \ jdk.jfr.events, \ @@ -511,6 +513,7 @@ jre-11=\ jdk.net, \ jdk.nio, \ jdk.nio.zipfs, \ + jdk.security, \ jdk.security.jarsigner, \ jdk.swing.interop, \ jdk.tools.jimage, \ @@ -536,6 +539,16 @@ jre-11=\ org.xml.sax.ext, \ org.xml.sax.helpers, \ com.sun.tracing +jre-12=${jre-11} +jre-13=${jre-11} +jre-14=${jre-11} +jre-15=${jre-11} +jre-16=${jre-11} +jre-17=${jre-11} +jre-18=${jre-11} +jre-19=${jre-11} +jre-20=${jre-11} +jre-21=${jre-11} # Bundle information optimization to improve performance felix.cache.singlebundlefile=true @@ -564,7 +577,27 @@ gosh.args=--nointeractive #fix for GLASSFISH-21236 org.osgi.framework.system.capabilities= \ ${eecap-${java.specification.version}} - #we are adding eecap entries upto 1.7 as GF is not supported for JDK<1.7 +#we are adding eecap entries upto 1.7 as GF is not supported for JDK<1.7 +eecap-21= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16,17,18,19,20,21" +eecap-20= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16,17,18,19,20" +eecap-19= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16,17,18,19" +eecap-18= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16,17,18" +eecap-17= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16,17" +eecap-16= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15,16" +eecap-15= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14,15" +eecap-14= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13,14" +eecap-13= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12,13" +eecap-12= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ + osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11,12" eecap-11= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9,10,11" eecap-10= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \ diff --git a/nucleus/osgi-platforms/osgi-cli-remote/osgi.bundle b/nucleus/osgi-platforms/osgi-cli-remote/osgi.bundle index 392f2c6e113..bb621fb877c 100644 --- a/nucleus/osgi-platforms/osgi-cli-remote/osgi.bundle +++ b/nucleus/osgi-platforms/osgi-cli-remote/osgi.bundle @@ -37,10 +37,11 @@ # only if the new code is made subject to such option by the copyright # holder. # +# Portions Copyright 2021 Payara Foundation and/or its affiliates -exportcontents: # shell packages resolved at runtime, whatever there is... DynamicImport-Package: \ org.apache.felix.shell, \ - org.apache.felix.service.command; status="provisional" + org.apache.felix.service.command; diff --git a/nucleus/osgi-platforms/osgi-cli-remote/pom.xml b/nucleus/osgi-platforms/osgi-cli-remote/pom.xml index 256957ad80e..1446a8e737f 100644 --- a/nucleus/osgi-platforms/osgi-cli-remote/pom.xml +++ b/nucleus/osgi-platforms/osgi-cli-remote/pom.xml @@ -39,7 +39,7 @@ only if the new code is made subject to such option by the copyright holder. - Portions Copyright [2019] [Payara Foundation and/or its affiliates] + Portions Copyright [2019-2021] [Payara Foundation and/or its affiliates] --> 4.0.0 @@ -64,7 +64,7 @@ org.osgi - org.osgi.core + osgi.core fish.payara.server.internal.common diff --git a/nucleus/osgi-platforms/osgi-container/pom.xml b/nucleus/osgi-platforms/osgi-container/pom.xml index dfaf4a246f8..f89a2e9dccb 100755 --- a/nucleus/osgi-platforms/osgi-container/pom.xml +++ b/nucleus/osgi-platforms/osgi-container/pom.xml @@ -39,7 +39,7 @@ holder. --> - + 4.0.0 @@ -78,7 +78,7 @@ org.osgi - org.osgi.core + osgi.core provided diff --git a/pom.xml b/pom.xml index 0b5facbd539..bae7ace949c 100644 --- a/pom.xml +++ b/pom.xml @@ -225,6 +225,8 @@ 1.7 ${project.build.outputDirectory} 0.2.6 + 7.0.0 + 1.1.0