Skip to content

Commit

Permalink
Don't shade org.apache.log4j (#4827)
Browse files Browse the repository at this point in the history
- This is not a direct dependency of the SDK, and no log4j classes are actually
   included in the bundle, so we should not be shading it.
 - By not shading it, classes that we *do* include in the bundle, i.e. from
   apache-commons-logging can reference the log4j classes properly.
  • Loading branch information
dagnir authored Jan 12, 2024
1 parent 72edf45 commit fb4d168
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "bugfix",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Fix shading of artifacts in the `bundle` by not `org.apache.log4j.*` packages. This allows proper binding of `commons-logging` to Log4J and enables dependencies that use commons logging (e.g. Apache HTTP Client) to properly bind to Log4j."
}
3 changes: 3 additions & 0 deletions bundle-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>software.amazon.awssdk.thirdparty.org.apache</shadedPattern>
<excludes>
<exclude>org.apache.log4j.*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>io.netty</pattern>
Expand Down

0 comments on commit fb4d168

Please sign in to comment.