This is an automated email from the ASF dual-hosted git repository.
fanng pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-0.8 by this push:
new 83fcb56fd4 [#6654] fix(bundle): remove log4j from Gravitino cloud
bundle jars (#6684)
83fcb56fd4 is described below
commit 83fcb56fd47c96fd7d4d29cf284f58f45341529b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Mar 13 10:39:04 2025 +0800
[#6654] fix(bundle): remove log4j from Gravitino cloud bundle jars (#6684)
### What changes were proposed in this pull request?
Remove log4j from Gravitino bundle jars
### Why are the changes needed?
Fix: #6654
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
build bundle jar and run with Iceberg REST server, the log is normal
Co-authored-by: FANNG <[email protected]>
---
bundles/aliyun-bundle/build.gradle.kts | 4 ++++
bundles/aliyun/build.gradle.kts | 4 ++++
bundles/aws-bundle/build.gradle.kts | 4 ++++
bundles/aws/build.gradle.kts | 4 ++++
bundles/azure-bundle/build.gradle.kts | 4 ++++
bundles/azure/build.gradle.kts | 4 ++++
bundles/gcp-bundle/build.gradle.kts | 4 ++++
bundles/gcp/build.gradle.kts | 4 ++++
8 files changed, 32 insertions(+)
diff --git a/bundles/aliyun-bundle/build.gradle.kts
b/bundles/aliyun-bundle/build.gradle.kts
index c837728559..d4b400cbe6 100644
--- a/bundles/aliyun-bundle/build.gradle.kts
+++ b/bundles/aliyun-bundle/build.gradle.kts
@@ -39,6 +39,10 @@ tasks.withType(ShadowJar::class.java) {
archiveClassifier.set("")
mergeServiceFiles()
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.jdom", "org.apache.gravitino.aliyun.shaded.org.jdom")
relocate("org.apache.commons.lang3",
"org.apache.gravitino.aliyun.shaded.org.apache.commons.lang3")
diff --git a/bundles/aliyun/build.gradle.kts b/bundles/aliyun/build.gradle.kts
index 9dfab9d679..0b463509ca 100644
--- a/bundles/aliyun/build.gradle.kts
+++ b/bundles/aliyun/build.gradle.kts
@@ -74,6 +74,10 @@ tasks.withType(ShadowJar::class.java) {
archiveClassifier.set("")
mergeServiceFiles()
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.jdom", "org.apache.gravitino.aliyun.shaded.org.jdom")
relocate("org.apache.commons.lang3",
"org.apache.gravitino.aliyun.shaded.org.apache.commons.lang3")
diff --git a/bundles/aws-bundle/build.gradle.kts
b/bundles/aws-bundle/build.gradle.kts
index a5765fb064..c4e16bc069 100644
--- a/bundles/aws-bundle/build.gradle.kts
+++ b/bundles/aws-bundle/build.gradle.kts
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
relocate("org.apache.commons.lang3",
"org.apache.gravitino.aws.shaded.org.apache.commons.lang3")
relocate("com.google.common",
"org.apache.gravitino.aws.shaded.com.google.common")
relocate("com.fasterxml.jackson",
"org.apache.gravitino.aws.shaded.com.fasterxml.jackson")
diff --git a/bundles/aws/build.gradle.kts b/bundles/aws/build.gradle.kts
index da06c4d2cc..a9dfebd7e4 100644
--- a/bundles/aws/build.gradle.kts
+++ b/bundles/aws/build.gradle.kts
@@ -59,6 +59,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
relocate("org.apache.commons.lang3",
"org.apache.gravitino.aws.shaded.org.apache.commons.lang3")
relocate("com.google.common",
"org.apache.gravitino.aws.shaded.com.google.common")
relocate("com.fasterxml.jackson",
"org.apache.gravitino.aws.shaded.com.fasterxml.jackson")
diff --git a/bundles/azure-bundle/build.gradle.kts
b/bundles/azure-bundle/build.gradle.kts
index fd57d33e10..c65e24637b 100644
--- a/bundles/azure-bundle/build.gradle.kts
+++ b/bundles/azure-bundle/build.gradle.kts
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.apache.httpcomponents",
"org.apache.gravitino.azure.shaded.org.apache.httpcomponents")
relocate("org.apache.commons",
"org.apache.gravitino.azure.shaded.org.apache.commons")
diff --git a/bundles/azure/build.gradle.kts b/bundles/azure/build.gradle.kts
index 1cbe4856af..4b137ccfab 100644
--- a/bundles/azure/build.gradle.kts
+++ b/bundles/azure/build.gradle.kts
@@ -59,6 +59,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.apache.httpcomponents",
"org.apache.gravitino.azure.shaded.org.apache.httpcomponents")
relocate("org.apache.commons",
"org.apache.gravitino.azure.shaded.org.apache.commons")
diff --git a/bundles/gcp-bundle/build.gradle.kts
b/bundles/gcp-bundle/build.gradle.kts
index 50300fafe0..3cf47a8067 100644
--- a/bundles/gcp-bundle/build.gradle.kts
+++ b/bundles/gcp-bundle/build.gradle.kts
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.apache.httpcomponents",
"org.apache.gravitino.gcp.shaded.org.apache.httpcomponents")
relocate("org.apache.commons",
"org.apache.gravitino.gcp.shaded.org.apache.commons")
diff --git a/bundles/gcp/build.gradle.kts b/bundles/gcp/build.gradle.kts
index 7d46fde9e9..9d1b6b7654 100644
--- a/bundles/gcp/build.gradle.kts
+++ b/bundles/gcp/build.gradle.kts
@@ -58,6 +58,10 @@ tasks.withType(ShadowJar::class.java) {
configurations = listOf(project.configurations.runtimeClasspath.get())
archiveClassifier.set("")
+ dependencies {
+ exclude(dependency("org.slf4j:slf4j-api"))
+ }
+
// Relocate dependencies to avoid conflicts
relocate("org.apache.httpcomponents",
"org.apache.gravitino.gcp.shaded.org.apache.httpcomponents")
relocate("org.apache.commons",
"org.apache.gravitino.gcp.shaded.org.apache.commons")