From fb4d1680e14aeb7cd0d2ad35aa8b6c48f5c1baa4 Mon Sep 17 00:00:00 2001
From: Dongie Agnir <261310+dagnir@users.noreply.github.com>
Date: Fri, 12 Jan 2024 11:15:45 -0800
Subject: [PATCH] Don't shade org.apache.log4j (#4827)
- 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.
---
.changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json | 6 ++++++
bundle-sdk/pom.xml | 3 +++
2 files changed, 9 insertions(+)
create mode 100644 .changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json
diff --git a/.changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json b/.changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json
new file mode 100644
index 000000000000..d449b9a7530b
--- /dev/null
+++ b/.changes/next-release/bugfix-AWSSDKforJavav2-1e17bfe.json
@@ -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."
+}
diff --git a/bundle-sdk/pom.xml b/bundle-sdk/pom.xml
index 8e3150a00169..5158072579aa 100644
--- a/bundle-sdk/pom.xml
+++ b/bundle-sdk/pom.xml
@@ -83,6 +83,9 @@
org.apache
software.amazon.awssdk.thirdparty.org.apache
+
+ org.apache.log4j.*
+
io.netty