Skip to content

Commit

Permalink
Build: don't include slf4j-api in bundled JARs (apache#10665)
Browse files Browse the repository at this point in the history
This excludes `slf4j-api` from being shadowed into `iceberg-aws-bundle`, `iceberg-azure-bundle`, `iceberg-gcp-bundle`, and `iceberg-hive3-orc-bundle`. This uses the same exclude pattern established by `iceberg-bundled-guava`.

Fixes apache#10534
  • Loading branch information
devinrsmith authored Jul 11, 2024
1 parent 41e1951 commit 048c92d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws-bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ project(":iceberg-aws-bundle") {
include 'NOTICE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
}

// relocate AWS-specific versions
relocate 'org.apache.http', 'org.apache.iceberg.aws.shaded.org.apache.http'
relocate 'io.netty', 'org.apache.iceberg.aws.shaded.io.netty'
Expand Down
4 changes: 4 additions & 0 deletions azure-bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ project(":iceberg-azure-bundle") {
include 'NOTICE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
}

// relocate Azure-specific versions
relocate 'io.netty', 'org.apache.iceberg.azure.shaded.io.netty'
relocate 'com.fasterxml.jackson', 'org.apache.iceberg.azure.shaded.com.fasterxml.jackson'
Expand Down
4 changes: 4 additions & 0 deletions gcp-bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ project(":iceberg-gcp-bundle") {
include 'NOTICE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
}

// relocate GCP-specific versions
relocate 'com.fasterxml.jackson', 'org.apache.iceberg.gcp.shaded.com.fasterxml.jackson'
relocate 'com.google.common', 'org.apache.iceberg.gcp.shaded.com.google.common'
Expand Down
4 changes: 4 additions & 0 deletions hive3-orc-bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ project(':iceberg-hive3-orc-bundle') {
include 'NOTICE'
}

dependencies {
exclude(dependency('org.slf4j:slf4j-api'))
}

// Relocate dependencies to avoid conflicts
relocate 'org.apache.orc.storage', 'org.apache.hadoop.hive'

Expand Down

0 comments on commit 048c92d

Please sign in to comment.