Skip to content

Commit 83fcb56

Browse files
[#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 <xiaojing@datastrato.com>
1 parent 3576c39 commit 83fcb56

File tree

8 files changed

+32
-0
lines changed

8 files changed

+32
-0
lines changed

bundles/aliyun-bundle/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ tasks.withType(ShadowJar::class.java) {
3939
archiveClassifier.set("")
4040
mergeServiceFiles()
4141

42+
dependencies {
43+
exclude(dependency("org.slf4j:slf4j-api"))
44+
}
45+
4246
// Relocate dependencies to avoid conflicts
4347
relocate("org.jdom", "org.apache.gravitino.aliyun.shaded.org.jdom")
4448
relocate("org.apache.commons.lang3", "org.apache.gravitino.aliyun.shaded.org.apache.commons.lang3")

bundles/aliyun/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ tasks.withType(ShadowJar::class.java) {
7474
archiveClassifier.set("")
7575
mergeServiceFiles()
7676

77+
dependencies {
78+
exclude(dependency("org.slf4j:slf4j-api"))
79+
}
80+
7781
// Relocate dependencies to avoid conflicts
7882
relocate("org.jdom", "org.apache.gravitino.aliyun.shaded.org.jdom")
7983
relocate("org.apache.commons.lang3", "org.apache.gravitino.aliyun.shaded.org.apache.commons.lang3")

bundles/aws-bundle/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
3636
configurations = listOf(project.configurations.runtimeClasspath.get())
3737
archiveClassifier.set("")
3838

39+
dependencies {
40+
exclude(dependency("org.slf4j:slf4j-api"))
41+
}
42+
3943
relocate("org.apache.commons.lang3", "org.apache.gravitino.aws.shaded.org.apache.commons.lang3")
4044
relocate("com.google.common", "org.apache.gravitino.aws.shaded.com.google.common")
4145
relocate("com.fasterxml.jackson", "org.apache.gravitino.aws.shaded.com.fasterxml.jackson")

bundles/aws/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ tasks.withType(ShadowJar::class.java) {
5959
configurations = listOf(project.configurations.runtimeClasspath.get())
6060
archiveClassifier.set("")
6161

62+
dependencies {
63+
exclude(dependency("org.slf4j:slf4j-api"))
64+
}
65+
6266
relocate("org.apache.commons.lang3", "org.apache.gravitino.aws.shaded.org.apache.commons.lang3")
6367
relocate("com.google.common", "org.apache.gravitino.aws.shaded.com.google.common")
6468
relocate("com.fasterxml.jackson", "org.apache.gravitino.aws.shaded.com.fasterxml.jackson")

bundles/azure-bundle/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
3636
configurations = listOf(project.configurations.runtimeClasspath.get())
3737
archiveClassifier.set("")
3838

39+
dependencies {
40+
exclude(dependency("org.slf4j:slf4j-api"))
41+
}
42+
3943
// Relocate dependencies to avoid conflicts
4044
relocate("org.apache.httpcomponents", "org.apache.gravitino.azure.shaded.org.apache.httpcomponents")
4145
relocate("org.apache.commons", "org.apache.gravitino.azure.shaded.org.apache.commons")

bundles/azure/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ tasks.withType(ShadowJar::class.java) {
5959
configurations = listOf(project.configurations.runtimeClasspath.get())
6060
archiveClassifier.set("")
6161

62+
dependencies {
63+
exclude(dependency("org.slf4j:slf4j-api"))
64+
}
65+
6266
// Relocate dependencies to avoid conflicts
6367
relocate("org.apache.httpcomponents", "org.apache.gravitino.azure.shaded.org.apache.httpcomponents")
6468
relocate("org.apache.commons", "org.apache.gravitino.azure.shaded.org.apache.commons")

bundles/gcp-bundle/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ tasks.withType(ShadowJar::class.java) {
3636
configurations = listOf(project.configurations.runtimeClasspath.get())
3737
archiveClassifier.set("")
3838

39+
dependencies {
40+
exclude(dependency("org.slf4j:slf4j-api"))
41+
}
42+
3943
// Relocate dependencies to avoid conflicts
4044
relocate("org.apache.httpcomponents", "org.apache.gravitino.gcp.shaded.org.apache.httpcomponents")
4145
relocate("org.apache.commons", "org.apache.gravitino.gcp.shaded.org.apache.commons")

bundles/gcp/build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ tasks.withType(ShadowJar::class.java) {
5858
configurations = listOf(project.configurations.runtimeClasspath.get())
5959
archiveClassifier.set("")
6060

61+
dependencies {
62+
exclude(dependency("org.slf4j:slf4j-api"))
63+
}
64+
6165
// Relocate dependencies to avoid conflicts
6266
relocate("org.apache.httpcomponents", "org.apache.gravitino.gcp.shaded.org.apache.httpcomponents")
6367
relocate("org.apache.commons", "org.apache.gravitino.gcp.shaded.org.apache.commons")

0 commit comments

Comments
 (0)