Skip to content

Resource conflict from 's3' and 'sts' module #3107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
linzebing opened this issue Mar 17, 2022 · 4 comments
Closed

Resource conflict from 's3' and 'sts' module #3107

linzebing opened this issue Mar 17, 2022 · 4 comments
Assignees
Labels
closing-soon This issue will close in 4 days unless further comments are made. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@linzebing
Copy link
Contributor

linzebing commented Mar 17, 2022

Describe the issue

I'm trying to add software.amazon.awssdk:sts dependency to my pom.xml, as usage of WebIdentityTokenFileCredentialsProvider requires sts module on the class path

/**
* A credential provider that will read web identity token file path, aws role arn
* and aws session name from system properties or environment variables for using
* web identity token credentials with STS. Use of this credentials provider requires
* the 'sts' module to be on the classpath.
*/
.

However, this created a resource conflict with software.amazon.awssdk:s3:

[INFO] --- duplicate-finder-maven-plugin:1.5.0:check (default) @ trino-exchange ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [software.amazon.awssdk:s3:2.17.102, software.amazon.awssdk:sts:2.17.102]:
[WARNING]   codegen-resources/customization.config
[WARNING]   codegen-resources/paginators-1.json
[WARNING]   codegen-resources/service-2.json
[WARNING] Found duplicate classes/resources in runtime classpath.
[WARNING] Found duplicate and different resources in [software.amazon.awssdk:s3:2.17.102, software.amazon.awssdk:sts:2.17.102]:
[WARNING]   codegen-resources/customization.config
[WARNING]   codegen-resources/paginators-1.json
[WARNING]   codegen-resources/service-2.json
[WARNING] Found duplicate classes/resources in test classpath.

I guess it's pretty common to have software.amazon.awssdk:s3 and software.amazon.awssdk:sts together as dependencies, what's the best approach I should take here?

Steps to Reproduce

Include software.amazon.awssdk:s3 and software.amazon.awssdk:sts in any maven project with duplicate-finder-maven-plugin

Current behavior

[INFO] --- duplicate-finder-maven-plugin:1.5.0:check (default) @ trino-exchange ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [software.amazon.awssdk:s3:2.17.102, software.amazon.awssdk:sts:2.17.102]:
[WARNING]   codegen-resources/customization.config
[WARNING]   codegen-resources/paginators-1.json
[WARNING]   codegen-resources/service-2.json
[WARNING] Found duplicate classes/resources in runtime classpath.
[WARNING] Found duplicate and different resources in [software.amazon.awssdk:s3:2.17.102, software.amazon.awssdk:sts:2.17.102]:
[WARNING]   codegen-resources/customization.config
[WARNING]   codegen-resources/paginators-1.json
[WARNING]   codegen-resources/service-2.json
[WARNING] Found duplicate classes/resources in test classpath.

AWS Java SDK version used

2.17.102

JDK version used

openjdk 11.0.12 2021-07-20 OpenJDK Runtime Environment Homebrew (build 11.0.12+0) OpenJDK 64-Bit Server VM Homebrew (build 11.0.12+0, mixed mode)

Operating System and version

MacOS Monterrey

@linzebing linzebing added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Mar 17, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@linzebing linzebing reopened this Mar 18, 2022
@debora-ito
Copy link
Member

@linzebing starting in SDK version 2.17.131 we removed the codegen-resources from the service jars (#3030), duplicate-finder-maven-plugin should stop finding the conflicts.

Those files are used to generate the service clients, they're unique for each service module. For example:

So even though duplicate-finder-maven-plugin flags them as duplicate they're not.

@debora-ito debora-ito self-assigned this Mar 18, 2022
@debora-ito debora-ito added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 18, 2022
@github-actions
Copy link

It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

@github-actions github-actions bot added the closing-soon This issue will close in 4 days unless further comments are made. label Mar 23, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will close in 4 days unless further comments are made. guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants