From c2e0445b883159e35f61069f42f1ee911d55ee12 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Sat, 30 Sep 2023 10:12:32 +0200 Subject: [PATCH] Upgrade to Karaf 4.4.4 (#1591) * Syncs distro customizations with Karaf 4.4.4 * Resolves app runbundles for the new dependencies * Add specs features because Pax Web now depends on "asm" * Use org.ops4j.pax.logging.DefaultServiceLog.level=ERROR in Demo App similar to when running Karaf to suppress "The use of package scanning to locate plugins is deprecated and will be removed in a future release" warnings due to LOG4J2-3644. For release notes, see: https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12352693&styleName=&projectId=12311140 Signed-off-by: Wouter Born --- distributions/openhab-verify/pom.xml | 1 + distributions/openhab/pom.xml | 8 ++ .../etc/org.apache.karaf.features.cfg | 3 +- .../openhab/src/main/resources/bin/karaf | 4 +- .../openhab/src/main/resources/bin/karaf.bat | 4 +- launch/app/app.bndrun | 74 +++++++++---------- pom.xml | 2 +- 7 files changed, 53 insertions(+), 43 deletions(-) diff --git a/distributions/openhab-verify/pom.xml b/distributions/openhab-verify/pom.xml index 25c8b165cd..4b62930d24 100644 --- a/distributions/openhab-verify/pom.xml +++ b/distributions/openhab-verify/pom.xml @@ -53,6 +53,7 @@ mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features + mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features mvn:${project.groupId}/addons/${project.version}/xml/features mvn:${project.groupId}/distro/${project.version}/xml/features diff --git a/distributions/openhab/pom.xml b/distributions/openhab/pom.xml index 45cdd5a139..9d8ad16063 100644 --- a/distributions/openhab/pom.xml +++ b/distributions/openhab/pom.xml @@ -28,6 +28,14 @@ xml compile + + org.apache.karaf.features + specs + ${karaf.version} + features + xml + compile + org.openhab.distro distro-kar diff --git a/distributions/openhab/src/main/filtered-resources/userdata/etc/org.apache.karaf.features.cfg b/distributions/openhab/src/main/filtered-resources/userdata/etc/org.apache.karaf.features.cfg index 67e06c97c9..37e952d36f 100644 --- a/distributions/openhab/src/main/filtered-resources/userdata/etc/org.apache.karaf.features.cfg +++ b/distributions/openhab/src/main/filtered-resources/userdata/etc/org.apache.karaf.features.cfg @@ -24,7 +24,8 @@ featuresRepositories = \ mvn:org.openhab.distro/distro/${project.version}/xml/features, \ mvn:org.openhab.distro/openhab-addons/${project.version}/xml/features, \ mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features, \ - mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features + mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features, \ + mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features # # Comma separated list of features to install at startup diff --git a/distributions/openhab/src/main/resources/bin/karaf b/distributions/openhab/src/main/resources/bin/karaf index 1780bc283c..810891b793 100755 --- a/distributions/openhab/src/main/resources/bin/karaf +++ b/distributions/openhab/src/main/resources/bin/karaf @@ -304,8 +304,8 @@ run() { ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} \ --add-reads=java.xml=java.logging \ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED \ - --patch-module java.base="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-4.4.3.jar" \ - --patch-module java.xml="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.4.3.jar" \ + --patch-module java.base="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.locator-4.4.4.jar" \ + --patch-module java.xml="${KARAF_HOME}/lib/endorsed/org.apache.karaf.specs.java.xml-4.4.4.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 \ diff --git a/distributions/openhab/src/main/resources/bin/karaf.bat b/distributions/openhab/src/main/resources/bin/karaf.bat index e9f75b7e97..a6ecbf89af 100644 --- a/distributions/openhab/src/main/resources/bin/karaf.bat +++ b/distributions/openhab/src/main/resources/bin/karaf.bat @@ -412,8 +412,8 @@ if "%KARAF_PROFILER%" == "" goto :RUN "%JAVA%" %JAVA_OPTS% %OPTS% ^ --add-reads=java.xml=java.logging ^ --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED ^ - --patch-module java.base="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.locator-4.4.3.jar" ^ - --patch-module java.xml="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.java.xml-4.4.3.jar" ^ + --patch-module java.base="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.locator-4.4.4.jar" ^ + --patch-module java.xml="%KARAF_HOME%\lib\endorsed\org.apache.karaf.specs.java.xml-4.4.4.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 ^ diff --git a/launch/app/app.bndrun b/launch/app/app.bndrun index 58f1b73c78..e96c51a318 100644 --- a/launch/app/app.bndrun +++ b/launch/app/app.bndrun @@ -83,7 +83,7 @@ feature.openhab-model-runtime-all: \ osgi.console=,\ osgi.console.enable.builtin=false,\ org.apache.cxf.osgi.http.transport.disable=true,\ - org.ops4j.pax.logging.DefaultServiceLog.level=WARN,\ + org.ops4j.pax.logging.DefaultServiceLog.level=ERROR,\ openhab.servicecfg=${.}/runtime/services.cfg,\ openhab.conf=${.}/runtime/conf,\ openhab.userdata=${.}/runtime/userdata,\ @@ -121,8 +121,8 @@ feature.openhab-model-runtime-all: \ # done # -runbundles: \ - org.ops4j.pax.logging.pax-logging-api;version='[2.2.0,2.2.1)',\ - org.ops4j.pax.logging.pax-logging-log4j2;version='[2.2.0,2.2.1)',\ + org.ops4j.pax.logging.pax-logging-api;version='[2.2.3,2.2.4)',\ + org.ops4j.pax.logging.pax-logging-log4j2;version='[2.2.3,2.2.4)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.15.2,2.15.3)',\ com.fasterxml.jackson.core.jackson-core;version='[2.15.2,2.15.3)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.15.2,2.15.3)',\ @@ -133,8 +133,8 @@ feature.openhab-model-runtime-all: \ com.google.guava;version='[30.1.0,30.1.1)',\ com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ com.google.inject;version='[5.0.1,5.0.2)',\ - com.sun.jna;version='[5.12.1,5.12.2)',\ - com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\ + com.sun.jna;version='[5.13.0,5.13.1)',\ + com.sun.xml.bind.jaxb-osgi;version='[2.3.8,2.3.9)',\ io.github.classgraph;version='[4.8.149,4.8.150)',\ io.methvin.directory-watcher;version='[0.18.0,0.18.1)',\ io.swagger.core.v3.swagger-annotations;version='[2.2.15,2.2.16)',\ @@ -149,11 +149,11 @@ feature.openhab-model-runtime-all: \ jollyday;version='[0.5.10,0.5.11)',\ org.antlr.runtime;version='[3.2.0,3.2.1)',\ org.apache.aries.component-dsl.component-dsl;version='[1.2.2,1.2.3)',\ - org.apache.aries.javax.jax.rs-api;version='[1.0.1,1.0.2)',\ + org.apache.aries.javax.jax.rs-api;version='[1.0.4,1.0.5)',\ org.apache.aries.jax.rs.whiteboard;version='[2.0.0,2.0.1)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.6,1.3.7)',\ org.apache.commons.commons-fileupload;version='[1.5.0,1.5.1)',\ - org.apache.commons.commons-io;version='[2.11.0,2.11.1)',\ + org.apache.commons.commons-io;version='[2.13.0,2.13.1)',\ org.apache.commons.lang3;version='[3.12.0,3.12.1)',\ org.apache.cxf.cxf-core;version='[3.6.1,3.6.2)',\ org.apache.cxf.cxf-rt-frontend-jaxrs;version='[3.6.1,3.6.2)',\ @@ -167,8 +167,8 @@ feature.openhab-model-runtime-all: \ org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ org.apache.felix.http.servlet-api;version='[1.2.0,1.2.1)',\ org.apache.felix.inventory;version='[1.1.0,1.1.1)',\ - org.apache.felix.scr;version='[2.2.4,2.2.5)',\ - org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\ + org.apache.felix.scr;version='[2.2.6,2.2.7)',\ + org.apache.felix.webconsole;version='[4.8.12,4.8.13)',\ org.apache.felix.webconsole.plugins.ds;version='[2.2.0,2.2.1)',\ org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\ org.apache.servicemix.specs.annotation-api-1.3;version='[1.3.0,1.3.1)',\ @@ -179,33 +179,33 @@ feature.openhab-model-runtime-all: \ org.eclipse.emf.ecore;version='[2.20.0,2.20.1)',\ org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.eclipse.equinox.common;version='[3.16.200,3.16.201)',\ - org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\ + org.eclipse.equinox.event;version='[1.6.200,1.6.201)',\ org.eclipse.equinox.metatype;version='[1.4.500,1.4.501)',\ - org.eclipse.jetty.alpn.client;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.client;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.http;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.http2.client;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.http2.common;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.http2.hpack;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.io;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.jaas;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.proxy;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.security;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.server;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.servlet;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.util;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.util.ajax;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.websocket.api;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.websocket.client;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.websocket.common;version='[9.4.50,9.4.51)',\ - org.eclipse.jetty.xml;version='[9.4.50,9.4.51)',\ + org.eclipse.jetty.alpn.client;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.client;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.http;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.http2.client;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.http2.common;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.http2.hpack;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.io;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.jaas;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.proxy;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.security;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.server;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.servlet;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.util;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.util.ajax;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.websocket.api;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.websocket.client;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.websocket.common;version='[9.4.52,9.4.53)',\ + org.eclipse.jetty.xml;version='[9.4.52,9.4.53)',\ org.eclipse.xtend.lib;version='[2.29.0,2.29.1)',\ org.eclipse.xtend.lib.macro;version='[2.29.0,2.29.1)',\ org.eclipse.xtext;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.common.types;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.util;version='[2.29.0,2.29.1)',\ - org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.eclipse.xtext.xbase;version='[2.29.0,2.29.1)',\ + org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.glassfish.hk2.external.aopalliance-repackaged;version='[2.4.0,2.4.1)',\ org.glassfish.hk2.external.javax.inject;version='[2.4.0,2.4.1)',\ org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ @@ -214,18 +214,18 @@ feature.openhab-model-runtime-all: \ org.objectweb.asm.tree;version='[9.4.0,9.4.1)',\ org.objectweb.asm.tree.analysis;version='[9.4.0,9.4.1)',\ org.objectweb.asm.util;version='[9.4.0,9.4.1)',\ - org.ops4j.pax.web.pax-web-api;version='[8.0.15,8.0.16)',\ - org.ops4j.pax.web.pax-web-extender-whiteboard;version='[8.0.15,8.0.16)',\ - org.ops4j.pax.web.pax-web-jetty;version='[8.0.15,8.0.16)',\ - org.ops4j.pax.web.pax-web-runtime;version='[8.0.15,8.0.16)',\ - org.ops4j.pax.web.pax-web-spi;version='[8.0.15,8.0.16)',\ - org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.15,8.0.16)',\ + org.ops4j.pax.web.pax-web-api;version='[8.0.22,8.0.23)',\ + org.ops4j.pax.web.pax-web-extender-whiteboard;version='[8.0.22,8.0.23)',\ + org.ops4j.pax.web.pax-web-jetty;version='[8.0.22,8.0.23)',\ + org.ops4j.pax.web.pax-web-runtime;version='[8.0.22,8.0.23)',\ + org.ops4j.pax.web.pax-web-spi;version='[8.0.22,8.0.23)',\ + org.ops4j.pax.web.pax-web-tomcat-common;version='[8.0.22,8.0.23)',\ org.osgi.service.component;version='[1.5.0,1.5.1)',\ - org.osgi.service.event;version='[1.4.0,1.4.1)',\ + org.osgi.service.event;version='[1.4.1,1.4.2)',\ org.osgi.service.jaxrs;version='[1.0.0,1.0.1)',\ org.osgi.service.metatype;version='[1.4.0,1.4.1)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ - org.osgi.util.promise;version='[1.2.0,1.2.1)',\ + org.osgi.util.promise;version='[1.3.0,1.3.1)',\ org.threeten.extra;version='[1.5.0,1.5.1)',\ org.yaml.snakeyaml;version='[2.0.0,2.0.1)',\ si-units;version='[2.1.0,2.1.1)',\ diff --git a/pom.xml b/pom.xml index 4ff8e63e57..bbf0b0150f 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 4.1.0-SNAPSHOT 4.1.0-SNAPSHOT - 4.4.3 + 4.4.4 17 ${oh.java.version}