This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-0.9 by this push:
new db626aca53 [#7287] fix(spark-connector): remove slf4j dependency from
packaging spark connector to avoid conflicts with Spark (#7289)
db626aca53 is described below
commit db626aca53b019d0e59c7e085178196f67ce61c7
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed May 28 17:57:11 2025 +0800
[#7287] fix(spark-connector): remove slf4j dependency from packaging spark
connector to avoid conflicts with Spark (#7289)
### What changes were proposed in this pull request?
Remove slf4j dependency from packaging to avoid conflicts with Spark.
### Why are the changes needed?
Fixes https://github.com/apache/gravitino/issues/7287
Spark sometimes has no logs, and there is no slf4j implementation class
available.
### Does this PR introduce _any_ user-facing change?
No.
Co-authored-by: tian bao <[email protected]>
---
spark-connector/v3.3/spark-runtime/build.gradle.kts | 2 ++
spark-connector/v3.4/spark-runtime/build.gradle.kts | 2 ++
spark-connector/v3.5/spark-runtime/build.gradle.kts | 2 ++
3 files changed, 6 insertions(+)
diff --git a/spark-connector/v3.3/spark-runtime/build.gradle.kts
b/spark-connector/v3.3/spark-runtime/build.gradle.kts
index 7f4b7f2edc..35fd6eacec 100644
--- a/spark-connector/v3.3/spark-runtime/build.gradle.kts
+++ b/spark-connector/v3.3/spark-runtime/build.gradle.kts
@@ -47,6 +47,8 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
archiveFileName.set("$baseName-$version.jar")
archiveClassifier.set("")
+ exclude("org/slf4j/**")
+
// Relocate dependencies to avoid conflicts
relocate("com.google", "org.apache.gravitino.shaded.com.google")
relocate("google", "org.apache.gravitino.shaded.google")
diff --git a/spark-connector/v3.4/spark-runtime/build.gradle.kts
b/spark-connector/v3.4/spark-runtime/build.gradle.kts
index 13de294c05..366dd1adf4 100644
--- a/spark-connector/v3.4/spark-runtime/build.gradle.kts
+++ b/spark-connector/v3.4/spark-runtime/build.gradle.kts
@@ -47,6 +47,8 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
archiveFileName.set("$baseName-$version.jar")
archiveClassifier.set("")
+ exclude("org/slf4j/**")
+
// Relocate dependencies to avoid conflicts
relocate("com.google", "org.apache.gravitino.shaded.com.google")
relocate("google", "org.apache.gravitino.shaded.google")
diff --git a/spark-connector/v3.5/spark-runtime/build.gradle.kts
b/spark-connector/v3.5/spark-runtime/build.gradle.kts
index c1cdae6c69..1af56bfb16 100644
--- a/spark-connector/v3.5/spark-runtime/build.gradle.kts
+++ b/spark-connector/v3.5/spark-runtime/build.gradle.kts
@@ -47,6 +47,8 @@ tasks.withType<ShadowJar>(ShadowJar::class.java) {
archiveFileName.set("$baseName-$version.jar")
archiveClassifier.set("")
+ exclude("org/slf4j/**")
+
// Relocate dependencies to avoid conflicts
relocate("com.google", "org.apache.gravitino.shaded.com.google")
relocate("google", "org.apache.gravitino.shaded.google")