Skip to content

Commit

Permalink
Upgrade to Karaf 4.4.4 (#1591)
Browse files Browse the repository at this point in the history
* 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 <github@maindrain.net>
  • Loading branch information
wborn authored Sep 30, 2023
1 parent c501406 commit c2e0445
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 43 deletions.
1 change: 1 addition & 0 deletions distributions/openhab-verify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<descriptors>
<descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/specs/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:${project.groupId}/addons/${project.version}/xml/features</descriptor>
<descriptor>mvn:${project.groupId}/distro/${project.version}/xml/features</descriptor>
</descriptors>
Expand Down
8 changes: 8 additions & 0 deletions distributions/openhab/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
<type>xml</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>specs</artifactId>
<version>${karaf.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openhab.distro</groupId>
<artifactId>distro-kar</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions distributions/openhab/src/main/resources/bin/karaf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions distributions/openhab/src/main/resources/bin/karaf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^
Expand Down
74 changes: 37 additions & 37 deletions launch/app/app.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -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,\
Expand Down Expand Up @@ -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)',\
Expand All @@ -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)',\
Expand All @@ -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)',\
Expand All @@ -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)',\
Expand All @@ -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)',\
Expand All @@ -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)',\
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ohc.version>4.1.0-SNAPSHOT</ohc.version>
<oha.version>4.1.0-SNAPSHOT</oha.version>

<karaf.version>4.4.3</karaf.version>
<karaf.version>4.4.4</karaf.version>

<oh.java.version>17</oh.java.version>
<maven.compiler.source>${oh.java.version}</maven.compiler.source>
Expand Down

0 comments on commit c2e0445

Please sign in to comment.