Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KARAF-7829 Override org.slf4j to 2.0.12 #1851

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PeterSuna
Copy link

@PeterSuna PeterSuna commented Jun 26, 2024

Override transitive dependency version for org.slf4j from 1.7.32 and 1.7.35 to 2.0.12 as defined in Karaf BOM project.

This issue arose after bumping slf4j to 2.0.12 in this commit:
03354d2#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R324

However, some transitive dependencies still remain at version 1.7.32 and 1.7.35. See the mvn dependency:tree output:

[INFO] --- dependency:3.6.1:tree (default-cli) @ manual ---
[INFO] org.apache.karaf:manual:bundle:4.5.0-SNAPSHOT
[INFO] +- org.apache.karaf.subsystem:org.apache.karaf.subsystem.core:jar:4.5.0-SNAPSHOT:provided
[INFO] | +- org.apache.karaf.features:org.apache.karaf.features.core:jar:4.5.0-SNAPSHOT:provided
[INFO] | | +- org.ops4j.pax.url:pax-url-aether:jar:2.6.14:provided
[INFO] | | | - org.slf4j:jcl-over-slf4j:jar:1.7.32:provided

[INFO] --- dependency:3.6.1:tree (default-cli) @ karaf-graphql-example-commands ---
[INFO] org.apache.karaf.examples:karaf-graphql-example-commands:bundle:4.5.0-SNAPSHOT
[INFO] +- org.apache.karaf.shell:org.apache.karaf.shell.core:jar:4.5.0-SNAPSHOT:compile
[INFO] | +- org.jline:jline:jar:3.21.0:compile
[INFO] | +- org.apache.karaf.jaas:org.apache.karaf.jaas.boot:jar:4.5.0-SNAPSHOT:compile
[INFO] | - org.apache.sshd:sshd-osgi:jar:2.12.1:compile
[INFO] | - org.slf4j:jcl-over-slf4j:jar:1.7.32:compile
[INFO] +- com.graphql-java:graphql-java:jar:19.2:compile
[INFO] | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.35:compile

[INFO] --- dependency:3.6.1:tree (default-cli) @ karaf-graphql-example-api ---
[INFO] org.apache.karaf.examples:karaf-graphql-example-api:bundle:4.5.0-SNAPSHOT
[INFO] +- com.graphql-java:graphql-java:jar:19.2:compile
[INFO] | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.35:compile

[INFO] --- dependency:3.6.1:tree (default-cli) @ karaf-graphql-example-scr-servlet ---
[INFO] org.apache.karaf.examples:karaf-graphql-example-scr-servlet:bundle:4.5.0-SNAPSHOT
[INFO] +- org.osgi:org.osgi.service.component.annotations:jar:1.4.0:provided
[INFO] +- com.graphql-java:graphql-java:jar:19.2:compile
[INFO] | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.35:compile

[INFO] --- dependency:3.6.1:tree (default-cli) @ karaf-graphql-example-core ---
[INFO] org.apache.karaf.examples:karaf-graphql-example-core:bundle:4.5.0-SNAPSHOT
[INFO] +- org.apache.karaf.examples:karaf-graphql-example-api🫙4.5.0-SNAPSHOT:compile
[INFO] +- org.osgi:org.osgi.service.component.annotations:jar:1.4.0:provided
[INFO] +- com.graphql-java:graphql-java:jar:19.2:compile
[INFO] | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.35:compile

[INFO] --- dependency:3.6.1:tree (default-cli) @ karaf-graphql-example-websocket ---
[INFO] org.apache.karaf.examples:karaf-graphql-example-websocket:bundle:4.5.0-SNAPSHOT
[INFO] +- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.54.v20240208:provided
[INFO] | +- org.eclipse.jetty.websocket:websocket-api:jar:9.4.54.v20240208:provided
[INFO] | - javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.apache.karaf.examples:karaf-graphql-example-api🫙4.5.0-SNAPSHOT:compile
[INFO] | - com.graphql-java:graphql-java:jar:19.2:compile
[INFO] | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.35:compile

This can be fixed by specifying the correct version in dependency management.

@PeterSuna PeterSuna force-pushed the main_KARAF-7829 branch 2 times, most recently from 2b61099 to 6a57489 Compare June 27, 2024 12:18
Override transitive dependency version for org.slf4j
from 1.7.32 and 1.7.35 to 2.0.12 as defined in the Karaf project.

Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
@jbonofre
Copy link
Member

jbonofre commented Jul 5, 2024

Just a note: this PR doesn't actually fix the problem described in KARAF-7829.
For Karaf client slf4j issue, it's coming of the client packaging slf4j logger/binder from slf4j 1.x. I will create another PR to upgrade the client to slf4j 2.x (using Provider instead of Binder).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants