This is an automated email from the ASF dual-hosted git repository.
jerryshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new a3fbbc906f [#11480] fix(build): bump slf4j-api to 2.0.17 to eliminate
duplicate jars in distribution (#11484)
a3fbbc906f is described below
commit a3fbbc906f7b3c50c398fb7b5772e9f46b054f20
Author: Qi Yu <[email protected]>
AuthorDate: Tue Jun 9 09:19:45 2026 +0800
[#11480] fix(build): bump slf4j-api to 2.0.17 to eliminate duplicate jars
in distribution (#11484)
### What changes were proposed in this pull request?
- Bumps `slf4j = "2.0.16"` → `"2.0.17"` in `gradle/libs.versions.toml`
- Removes the previous `resolutionStrategy.force` workaround from
`build.gradle.kts`
### Why are the changes needed?
`distribution/package/libs/` contained two versions of `slf4j-api`
simultaneously:
- `slf4j-api-2.0.16.jar` — from modules that only see the catalog-pinned
version
- `slf4j-api-2.0.17.jar` — from modules using `bundles.log4j` (`core`,
`server`, `server-common`), where `log4j-slf4j2-impl:2.25.4` declares a
transitive dependency on `slf4j-api:2.0.17`
Because the `assembleDistribution` copy task collects `runtimeClasspath`
from each subproject independently, and the two versions have different
filenames, `DuplicatesStrategy.EXCLUDE` cannot deduplicate them.
Bumping the catalog entry to `2.0.17` (which `log4j-slf4j2-impl:2.25.4`
already requires) makes all subprojects naturally converge to the same
version through Gradle's normal conflict resolution, so only
`slf4j-api-2.0.17.jar` ends up in the distribution.
Fix: #11480
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- `./gradlew compileJava -PskipITs --parallel` — BUILD SUCCESSFUL (all
456 tasks)
- `./gradlew test -PskipITs --parallel` — BUILD SUCCESSFUL (all 763
tasks, 29 min)
- Verified `distribution/package/libs/` now contains only
`slf4j-api-2.0.17.jar`
- Verified `:common:dependencies` resolves directly to `2.0.17` without
any `->` upgrade
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
gradle/libs.versions.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 0d9023129c..bd9a1d15ff 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -28,7 +28,7 @@ snakeyaml = "2.0"
gson = "2.11.0"
guava = "32.1.3-jre"
lombok = "1.18.20"
-slf4j = "2.0.16"
+slf4j = "2.0.17"
log4j = "2.25.4"
arrow = "18.3.0"
lance = "6.0.0"