Skip to content
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

Correct package splitting between AWS Java SDK Modules #1658

Closed
damnhandy opened this issue Jul 1, 2018 · 11 comments
Closed

Correct package splitting between AWS Java SDK Modules #1658

damnhandy opened this issue Jul 1, 2018 · 11 comments
Labels
feature-request A feature should be added or improved.

Comments

@damnhandy
Copy link

A number of AWS Java SDK modules share packages across modules. For example, the aws-java-sdk-iam and aws-java-sdk-kms modules both split the com.amazonaws.auth.policy.actions package across multiple JAR files. There are several instance of this type of behavior beyond just these two modules.

This presents a significant incompatibility with Java Platform Module System as package splitting across modules is forbidden. This is a significant barrier to moving beyond Java 8.

@spfink spfink added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jul 2, 2018
@rverma-nikiai
Copy link

rverma-nikiai commented Jul 5, 2018

The issue exists even with gradle. We have to complete exclude module-info to use aws sdk.

@shorea
Copy link
Contributor

shorea commented Jul 9, 2018

We will be addressing this in V2 to be compatible with OSGI and Java module system. Unfortunately there isn't anything we can do in V1. You can check out the osgi module which is a bundle of the entire SDK which avoids this problem.

@shorea shorea closed this as completed Jul 9, 2018
@danieljamesscott
Copy link

So does this mean that V1 won't support anything newer than Java 8?

@himanshukandwal
Copy link

Why don't just create a central policy.actions module or specific package names.

@michaelwiles
Copy link

Is there any technical reason why the shared package cannot be extracted into its own jar? The reason I ask is if there isn't then there's nothing stopping me forking the code and building my own java 9 modules compliant version.

The reality is now my whole code base is basically stuck on java 8 just because I use aws sdk... and I have to wait for version 2...

@varunnvs92
Copy link
Contributor

Marking this as feature request. I have added this to our internal backlog. We are currently busy with v2 and I am not sure when we will get to this.

@varunnvs92 varunnvs92 reopened this Sep 10, 2018
@varunnvs92 varunnvs92 added feature-request A feature should be added or improved. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 10, 2018
@varunnvs92
Copy link
Contributor

@michaelwiles

Is there any technical reason why the shared package cannot be extracted into its own jar?

I don't see any technical blocker for this. As some packages are shared by many modules, we need to make sure existing applications are not broken by the changes.

@orielmaute
Copy link

As workaround you can use the AWS SDK for Java Bundle as Automatic Java 9 module. The bundle is an Ueber-Jar that contains the whole AWS SDK including it's dependencies (re-packaged); with the bundle I managed to use the aws sdk as automatic Java 9 module.
@see https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bundle

@valters
Copy link

valters commented Oct 29, 2018

@orielmaute , aws-java-sdk-bundle does not seem to be valid module, 1.11.438 at least...

$ which jar
$HOME/java/jdk-11+28/bin/jar
~/.m2/repository/com/amazonaws/aws-java-sdk-bundle/1.11.438$ jar --file aws-java-sdk-bundle-1.11.438.jar --describe-module
Unable to derive module descriptor for: aws-java-sdk-bundle-1.11.438.jar
Provider class com.fasterxml.jackson.core.JsonFactory not in module

It looks to me that they repackaged Jackson to com.amazonaws.thirdparty, but left META-INF/services/ around that are pointing nowhere. Do you think we should open a ticket with them?

@millems
Copy link
Contributor

millems commented Mar 31, 2020

We are fixing the package splitting in 2.x, but will not be making changes in the 1.x series to support this, because we're trying to concentrate our developer effort on 2.x.

@yashTL
Copy link

yashTL commented Jun 6, 2024

Hi @millems @varunnvs92
Modules aws.java.sdk.s3 and aws.java.sdk.sqs export package com.amazonaws.auth.policy.actions to module spring.context
Do you know how we can solve this? I have tried using aws-java-sdk-bundle also but it seems to be invalid. Can you help me find a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests