Closed mamtananavati closed 3 years ago
Hi @mamtananavati thank you for reaching out.
Right now this is by design. We are careful in not creating execution.interceptors
files within the same module, and in this case they are in two different modules aws-core
and sdk-core
, even though the files have the same namespace.
That said, we are aware of how this can lead to problems if you want to shade the SDK. Is this your case, are you shading the SDK? Or is this simply a report of the results of running the duplicate maven plugin?
Can you tell us more about your use case?
The report above is from duplicate maven plugin but we are shading the jars as well and unfortunately, a class from one is referencing the other module , so there is no way for me to exclude one or the other dependency.
Thank you for following up, we've added this to our backlog.
If anyone else is affected by this, please upvote the original description.
This also affects building an Uberjar.
@mamtananavati @fsvehla
A fix was released via #2734, available in SDK version 2.17.46
.
Please try it out and let us know if you still see the issue.
@debora-ito Überjar building (with sbt-assembly) is now fixed.
Describe the issue
There is a duplicate class on classpath exception for software/amazon/awssdk/global/handlers/execution.interceptors between software.amazon.awssdk.aws-core and software.amazon.awssdk.sdk-core
It looks like this was added 10 days ago https://github.com/aws/aws-sdk-java-v2/blob/master/core/aws-core/src/main/resources/software/amazon/awssdk/global/handlers/execution.interceptors
Steps to Reproduce
Running org.basepom.maven:duplicate-finder-maven-plugin which project which consumes the above dependencies transitively causes the build to fail. The issues goes away when i roll back the version to 2.17.14
This collision shows up during maven shading.
Current Behavior
[WARNING] Found duplicate and different resources in [software.amazon.awssdk:aws-core:2.17.24, software.amazon.awssdk:sdk-core:2.17.24]: [WARNING] software/amazon/awssdk/global/handlers/execution.interceptors [WARNING] Found duplicate classes/resources in compile classpath. [WARNING] Found duplicate and different resources in [software.amazon.awssdk:aws-core:2.17.24, software.amazon.awssdk:sdk-core:2.17.24]: [WARNING] software/amazon/awssdk/global/handlers/execution.interceptors
Your Environment