|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| src/ | | 04-Jul-2025 | - | 1,753 | 1,388 |
| README.md | D | 04-Jul-2025 | 6.6 KiB | 63 | 50 |
| pom.xml | D | 04-Jul-2025 | 7.4 KiB | 175 | 146 |
README.md
1# Maven Archetype for client applications using the AWS SDK for Java 2.x
2
3## Description
4This is an Apache Maven Archetype to create a client application with
5a dependency of [AWS Java SDK 2.x][aws-java-sdk-v2].
6
7### Features
8
9The generated application has the following features:
10
11- Uses [Bill of Materials][BOM] to manage SDK dependencies
12- Contains the code to create the SDK client
13- Out-of-box support of GraalVM Native Image when `nativeImage` is enabled
14
15## Usage
16
17You can use `mvn archetype:generate` to generate a project using this archetype. See [maven archetype usage guidance][maven-archetype-usage] for more information.
18
19- Interactive mode
20
21```
22mvn archetype:generate \
23 -DarchetypeGroupId=software.amazon.awssdk \
24 -DarchetypeArtifactId=archetype-app-quickstart \
25 -DarchetypeVersion=2.x
26```
27
28- Batch mode
29
30```
31mvn archetype:generate \
32 -DarchetypeGroupId=software.amazon.awssdk \
33 -DarchetypeArtifactId=archetype-app-quickstart \
34 -DarchetypeVersion=2.x \
35 -DgroupId=com.test \
36 -DnativeImage=true \
37 -DhttpClient=apache-client \
38 -DartifactId=sample-project \
39 -Dservice=s3 \
40 -DinteractiveMode=false \
41 -DcredentialProvider=default
42```
43
44### Parameters
45
46| Parameter Name | Default Value | Description |
47|-------------------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
48| `service` (required) | n/a | Specifies the service client to be used in the application, eg: s3, dynamodb. Only one service should be provided. You can find available services [here][java-sdk-v2-services]. |
49| `groupId`(required) | n/a | Specifies the group ID of the project |
50| `artifactId`(required) | n/a | Specifies the artifact ID of the project |
51| `nativeImage`(required) | n/a | Specifies whether GraalVM Native Image configuration should be included |
52| `httpClient`(required) | n/a | Specifies the http client to be used by the SDK client. Available options are `url-connection-client` (sync), `apache-client` (sync), `netty-nio-client` (async). See [http clients][sdk-http-clients] |
53| `credentialProvider` | default | Specify the credential-provider to be used by the SDK client and imports relevant dependencies. Available options are `default` which uses the [default credential provider chain](https://docs.aws.amazon.com/sdkref/latest/guide/standardized-credentials.html), or `identity-center` whi uses [IAM Identity Center](https://docs.aws.amazon.com/sdkref/latest/guide/feature-sso-credentials.html) |
54| `javaSdkVersion` | Same version as the archetype version | Specifies the version of the AWS Java SDK 2.x to be used |
55| `version` | 1.0-SNAPSHOT | Specifies the version of the project |
56| `package` | ${groupId} | Specifies the package name for the classes |
57
58[aws-java-sdk-v2]: https://github.com/aws/aws-sdk-java-v2
59[java-sdk-v2-services]: https://github.com/aws/aws-sdk-java-v2/tree/master/services
60[sdk-http-clients]: https://github.com/aws/aws-sdk-java-v2/tree/master/http-clients
61[maven-archetype-usage]: https://maven.apache.org/archetype/maven-archetype-plugin/usage.html
62[graalvm]: https://www.graalvm.org/docs/getting-started/#native-images
63[bom]: https://github.com/aws/aws-sdk-java-v2/blob/master/bom