Skip to content

Commit

Permalink
aws-sdk-v2: add module.info
Browse files Browse the repository at this point in the history
  • Loading branch information
jknack committed Sep 7, 2024
1 parent aa65288 commit 29d8cb3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 18 deletions.
18 changes: 0 additions & 18 deletions modules/jooby-awssdk-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

<properties>
<aws.java.sdk.version>2.20.43</aws.java.sdk.version>

<Module-Name>io.jooby.awssdkv2</Module-Name>
</properties>

<dependencies>
Expand Down Expand Up @@ -74,20 +72,4 @@
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>${Module-Name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* Aws module for aws-java-sdk 2.x. This module:
*
* <p>- Integrates AWS credentials within application properties.
*
* <p>- Register AWS services as application services (so they can be used by require calls or DI).
*
* <p>- Add graceful shutdown to any {@link software.amazon.awssdk.utils.SdkAutoCloseable} instance.
*
* <p>Usage:
*
* <pre>{@code
* {
* install(
* new AwsModule()
* .setup(credentials -> {
* var s3 = S3Client.builder().region(Region.US_EAST_1).build();
* var s3transfer = S3TransferManager.builder().s3Client(s3).build()
* return Stream.of(s3, s3transfer);
* })
* );
* }
* }</pre>
*
* <p>Previous example register AmazonS3Client and TransferManager services
*
* <p>NOTE: You need to add the service dependencies to your project.
*
* @author edgar
* @since 3.3.1
*/
@ReturnValuesAreNonnullByDefault
package io.jooby.awssdkv2;

import edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault;
10 changes: 10 additions & 0 deletions modules/jooby-awssdk-v2/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module io.jooby.awssdkv2 {
exports io.jooby.awssdkv2;

requires io.jooby;
requires typesafe.config;
requires com.github.spotbugs.annotations;
requires software.amazon.awssdk.core;
requires software.amazon.awssdk.auth;
requires software.amazon.awssdk.utils;
}

0 comments on commit 29d8cb3

Please sign in to comment.