This is an automated email from the ASF dual-hosted git repository.
luigidemasi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kit.git
The following commit(s) were added to refs/heads/main by this push:
new c5cde2ec Bump org.slf4j:slf4j-nop from 1.7.36 to 2.0.20 (#225)
c5cde2ec is described below
commit c5cde2eccb132e7bdd423d2771eb9a68aacad80c
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Thu Dec 3 16:31:52 2026 +0100
Bump org.slf4j:slf4j-nop from 1.7.36 to 2.0.20 (#225)
* Bump org.slf4j:slf4j-nop from 1.7.36 to 2.0.20
Bumps org.slf4j:slf4j-nop from 1.7.36 to 2.0.20.
---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-nop
dependency-version: 2.0.20
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <[email protected]>
* Align the Ship resolver logging stack on SLF4J 2.0.20
Pin the API, JCL bridge and NOP provider together so the shaded resolver
loads its own provider. Exercise service discovery in the packaged JAR and
update the binary license records.
Co-authored-by: dependabot[bot]
<49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <[email protected]>
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot]
<49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi De Masi <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
---
distribution.properties | 2 +-
kit/camel-kit-ship-resolver/pom.xml | 10 ++++++++++
kit/camel-kit-ship-resolver/src/main/legal/LICENSE | 6 +++---
.../src/main/legal/dependencies.tsv | 4 ++--
.../camel/kit/ship/resolver/ResolverIsolationIT.java | 18 +++++++++++++++---
kit/pom.xml | 2 +-
6 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/distribution.properties b/distribution.properties
index 9fd9aa80..2793e121 100644
--- a/distribution.properties
+++ b/distribution.properties
@@ -79,7 +79,7 @@ maven.jar.plugin.version=3.5.1
maven.shade.plugin.version=3.6.1
maven.surefire.plugin.version=3.5.4
maven.failsafe.plugin.version=3.5.4
-slf4j.version=1.7.36
+slf4j.version=2.0.20
json.schema.validator.version=2.0.4
# Content-locked JVM payload compatibility. Rows are exact and fail closed;
diff --git a/kit/camel-kit-ship-resolver/pom.xml
b/kit/camel-kit-ship-resolver/pom.xml
index 7e96c2ba..c70de3cb 100644
--- a/kit/camel-kit-ship-resolver/pom.xml
+++ b/kit/camel-kit-ship-resolver/pom.xml
@@ -33,6 +33,16 @@
<artifactId>maven-model-builder</artifactId>
<version>${maven.provider.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
diff --git a/kit/camel-kit-ship-resolver/src/main/legal/LICENSE
b/kit/camel-kit-ship-resolver/src/main/legal/LICENSE
index 16dee15e..6e9e16d8 100644
--- a/kit/camel-kit-ship-resolver/src/main/legal/LICENSE
+++ b/kit/camel-kit-ship-resolver/src/main/legal/LICENSE
@@ -1,4 +1,4 @@
-This product bundles the SLF4J API and NOP binding (MIT), ASM (BSD-3-Clause)
and two Eclipse Sisu
+This product bundles the SLF4J API and NOP provider (MIT), ASM (BSD-3-Clause)
and two Eclipse Sisu
annotations (EPL-2.0). Their original notices follow. The Maven,
HttpComponents,
Commons and Plexus licensing files are listed below, including the additional
licenses for code included by Plexus.
@@ -41,10 +41,10 @@ THE POSSIBILITY OF SUCH DAMAGE.
SLF4J JCL bridge (jcl-over-slf4j), Apache-2.0
Copyright 2001-2004 The Apache Software Foundation.
-SLF4J 1.7.36 (API and NOP binding), MIT
+SLF4J 2.0.20 (API and NOP provider), MIT
https://github.com/qos-ch/slf4j
-Copyright (c) 2004-2022 QOS.ch Sarl (Switzerland)
+Copyright (c) 2004-2023 QOS.ch
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining
diff --git a/kit/camel-kit-ship-resolver/src/main/legal/dependencies.tsv
b/kit/camel-kit-ship-resolver/src/main/legal/dependencies.tsv
index 971cc8a3..baacec71 100644
--- a/kit/camel-kit-ship-resolver/src/main/legal/dependencies.tsv
+++ b/kit/camel-kit-ship-resolver/src/main/legal/dependencies.tsv
@@ -6,5 +6,5 @@ org.codehaus.plexus:plexus-interpolation *
Apache-2.0
org.eclipse.sisu:org.eclipse.sisu.inject 0.9.0.M4 Eclipse Sisu
Inject {version}
org.ow2.asm:asm 9.9 ASM {version}
org.slf4j:jcl-over-slf4j * Apache-2.0
-org.slf4j:slf4j-api 1.7.36 SLF4J {version}
-org.slf4j:slf4j-nop 1.7.36 SLF4J {version}
+org.slf4j:slf4j-api 2.0.20 SLF4J {version}
+org.slf4j:slf4j-nop 2.0.20 SLF4J {version}
diff --git
a/kit/camel-kit-ship-resolver/src/test/java/org/apache/camel/kit/ship/resolver/ResolverIsolationIT.java
b/kit/camel-kit-ship-resolver/src/test/java/org/apache/camel/kit/ship/resolver/ResolverIsolationIT.java
index f0fb2ebd..e8cd95ce 100644
---
a/kit/camel-kit-ship-resolver/src/test/java/org/apache/camel/kit/ship/resolver/ResolverIsolationIT.java
+++
b/kit/camel-kit-ship-resolver/src/test/java/org/apache/camel/kit/ship/resolver/ResolverIsolationIT.java
@@ -9,6 +9,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Properties;
+import java.util.ServiceLoader;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
@@ -57,9 +58,6 @@ class ResolverIsolationIT {
assertFalse(entries.stream().anyMatch(
name -> name
.startsWith(INTERNAL_PREFIX +
"org/apache/maven/repository/internal/MavenResolverModule")));
- assertTrue(entries.contains(INTERNAL_PREFIX +
"org/slf4j/impl/StaticLoggerBinder.class"));
- assertTrue(entries.contains(INTERNAL_PREFIX +
"org/slf4j/impl/StaticMDCBinder.class"));
- assertTrue(entries.contains(INTERNAL_PREFIX +
"org/slf4j/impl/StaticMarkerBinder.class"));
assertEquals(
Set.of(),
entries.stream()
@@ -76,6 +74,20 @@ class ResolverIsolationIT {
}
}
+ @Test
+ void shadedSlf4jLoadsItsNopProvider() throws Exception {
+ String slf4j = INTERNAL_PREFIX.replace('/', '.') + "org.slf4j.";
+ try (URLClassLoader isolated = new URLClassLoader(
+ new URL[]{resolverJar().toUri().toURL()},
ClassLoader.getPlatformClassLoader())) {
+ Class<?> service = isolated.loadClass(slf4j +
"spi.SLF4JServiceProvider");
+ assertEquals(List.of(slf4j + "nop.NOPServiceProvider"),
+ ServiceLoader.load(service,
isolated).stream().map(provider -> provider.type().getName()).toList());
+ Class<?> factory = isolated.loadClass(slf4j + "LoggerFactory");
+ assertEquals(isolated.loadClass(slf4j +
"helpers.NOPLoggerFactory"),
+
factory.getMethod("getILoggerFactory").invoke(null).getClass());
+ }
+ }
+
@Test
void incompatibleParentFirstResolverClassesCannotInterfere() throws
Exception {
Path parentClasses = compileIncompatibleParent();
diff --git a/kit/pom.xml b/kit/pom.xml
index a3affa81..dbaf1125 100644
--- a/kit/pom.xml
+++ b/kit/pom.xml
@@ -41,7 +41,7 @@
<maven.shade.plugin.version>3.6.1</maven.shade.plugin.version>
<maven.surefire.plugin.version>3.5.4</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>3.5.4</maven.failsafe.plugin.version>
- <slf4j.version>1.7.36</slf4j.version>
+ <slf4j.version>2.0.20</slf4j.version>
<json.schema.validator.version>2.0.4</json.schema.validator.version>
<!-- END distribution property mirrors -->
<!-- Code quality -->