I would like to find out what version of package org.apache.commons.lang3.builder is available in the karaf 4.3.1 runtime?
Is there a karaf shell command that provide this information? The problem I'm encountering is that when I build this bundle[1] with the karaf 4.3.1 BoM, I get the following error when trying to load a feature[2] that loads a different bundle[3] that in turn loads the [1] bundle, I get this error: https://gist.github.com/steinarb/b1d76bd2698e7831d6ef7478399bb35a If I build [1] with the 4.3.0 or 4.2.11 BoM and then build the intermediate bundle[3] against that snapshot, and then builds authservice[4], then feature [2] loads fine. The interesting bit from the failing integration test, is this at the end: https://gist.github.com/steinarb/b1d76bd2698e7831d6ef7478399bb35a#file-authservice-integration-test-L214 If I diff the manifest of beans.immutable built with 4.2.11 or 4.3.0 BoM against the maniest of beans.immutable built with the 4.3.1 BoM, the difference is this: b@lorenzo:~/workspaces/ws03/authservice$ diff -u /tmp/immutable-bean-manifest-mf-01 /tmp/immutable-bean-manifest-mf-02 --- /tmp/immutable-bean-manifest-mf-01 2021-04-08 18:37:30.638799307 +0200 +++ /tmp/immutable-bean-manifest-mf-02 2021-04-08 18:36:25.871626006 +0200 @@ -1,5 +1,5 @@ Manifest-Version: 1.0 -Bnd-LastModified: 1617899815331 +Bnd-LastModified: 1617899489360 Build-Jdk-Spec: 11 Bundle-Description: Common code for Java beans Bundle-License: http://www.apache.org/licenses/LICENSE-2.0 @@ -9,7 +9,6 @@ Bundle-Version: 1.1.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: no.priv.bang.beans.immutable;version="1.1.0" -Import-Package: org.apache.commons.lang3.builder;version="[3.11,4)" +Import-Package: org.apache.commons.lang3.builder;version="[3.12,4)" Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" Tool: Bnd-5.1.1.202006162103 Ie. when building with BoM 4.3.1 the minimum version of org.apache.commons.lang3.builder becomes 3.12. Note that, if I build [1] against the 4.3.1 BoM and loads it directly from the karaf 4.3.1 command line, it loads fine: karaf@root()> feature:repo-add mvn:no.priv.bang.beans/karaf/LATEST/xml/features Adding feature url mvn:no.priv.bang.beans/karaf/LATEST/xml/features karaf@root()> feature:install beans-immutable karaf@root()> So presumably a naked karaf 4.3.1 has org.apache.commons.lang3.builder 3.12? Is it possible for a dependency to somehow pull in an older version of the bundle and replace the built-in bundle? (I'll look for other users of org.apache.commons.lang3.builder to see if I have forgotten to upgrade it) (Anyway, this is not a showstopper, since I can work around it by building [1] against the 4.3.0 BoM, but it's a weirdness and I don't like that...) Thanks! - Steinar References: [1] <https://github.com/steinarb/beans/tree/master/beans.immutable> [2] <https://github.com/steinarb/authservice/blob/master/karaf/src/main/filtered-resources/feature.xml#L47> [3] <https://github.com/steinarb/osgi-service/tree/master/osgiservice.users> [5] <https://github.com/steinarb/authservice>
