Skip to content

Commit 09355be

Browse files
committed
Update based on feedback
1 parent a2056f7 commit 09355be

File tree

15 files changed

+45
-29
lines changed

15 files changed

+45
-29
lines changed

archetypes/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ This module contains maven archetypes for AWS Java SDK 2.x.
55

66
## Archetypes
77

8-
- [archetype-lambda](archetype-lambda/README.md) - a lambda function template using AWS Java SDK 2.x
8+
- [archetype-app](archetype-app/README.md) - a simple client application
9+
template using the AWS SDK for Java 2.x
10+
- [archetype-lambda](archetype-lambda/README.md) - an AWS Lambda function
11+
template using the AWS SDK for Java 2.x
12+
913

archetypes/archetype-app/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Maven Archetype for client applications using the AWS SDK for Java 2.x
22

33
## Description
4-
This is an Apache Maven Archetype to create a client application template using
5-
[AWS Java SDK 2.x][aws-java-sdk-v2]. You can use the archetype to generate
6-
an application that has out-of-box [GraalVM Native Image][graalvm] support
4+
This is an Apache Maven Archetype to create a client application with
5+
a dependency of [AWS Java SDK 2.x][aws-java-sdk-v2].
6+
7+
### Features
8+
9+
The 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
714

815
## Usage
916

@@ -27,6 +34,7 @@ mvn archetype:generate \
2734
-DarchetypeVersion=2.x \
2835
-DgroupId=com.test \
2936
-DnativeImage=true \
37+
-DhttpClient=apache-client \
3038
-DartifactId=sample-project \
3139
-Dservice=s3 \
3240
-DinteractiveMode=false
@@ -36,11 +44,11 @@ mvn archetype:generate \
3644
3745
Parameter Name | Default Value | Description
3846
---|---|---
39-
`service` (required) | n/a | Specifies the service client to be used in the lambda function, eg: s3, dynamodb. You can find available services [here][java-sdk-v2-services].
47+
`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].
4048
`groupId`(required) | n/a | Specifies the group ID of the project
4149
`artifactId`(required) | n/a | Specifies the artifact ID of the project
42-
`nativeImage` | n/a | Specifies whether GraalVM Native Image configuration should be included
43-
`httpClient` | apache-client | 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]
50+
`nativeImage`(required) | n/a | Specifies whether GraalVM Native Image configuration should be included
51+
`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]
4452
`javaSdkVersion` | Same version as the archetype version | Specifies the version of the AWS Java SDK 2.x to be used
4553
`version` | 1.0-SNAPSHOT | Specifies the version of the project
4654
`package` | ${groupId} | Specifies the package name for the classes

archetypes/archetype-app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
</plugin>
121121

122122
<!-- workaround to copy the global.vm and serviceMapping.vm to the sub folders
123-
because gloabl.vm is not so global any more
123+
because global.vm is not so global any more
124124
see https://github.com/aws/aws-sdk-java-v2/issues/1981 -->
125125
<plugin>
126126
<artifactId>maven-resources-plugin</artifactId>

archetypes/archetype-app/src/main/resources/META-INF/maven/archetype-metadata.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<requiredProperty key="service">
3838
</requiredProperty>
3939
<requiredProperty key="httpClient">
40-
<defaultValue>apache-client</defaultValue>
4140
<validationRegex>(url-connection-client|apache-client|netty-nio-client)</validationRegex>
4241
</requiredProperty>
4342
<requiredProperty key="nativeImage">

archetypes/archetype-app/src/main/resources/archetype-resources/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Below is the structure of the generated project.
1515
├── src
1616
│   ├── main
1717
│   │   ├── java
18-
│   │   │   └── pacakge
18+
│   │   │   └── package
1919
│   │   │   ├── App.java
2020
│   │   │   ├── DependencyFactory.java
2121
│   │   │   └── Handler.java
2222
│   │   └── resources
2323
│   │   └── simplelogger.properties
2424
│   └── test
2525
│   └── java
26-
│   └── pacakge
26+
│   └── package
2727
│   └── HandlerTest.java
2828
```
2929

3030
- `App.java`: main entry of the application
31-
- `DependencyFactory.java`: contains the SDK client
31+
- `DependencyFactory.java`: creates the SDK client
3232
- `Handler.java`: you can invoke the api calls using the SDK client here.
3333

3434
#[[####]]# Building the project

archetypes/archetype-app/src/test/resources/projects/apachehttpclient/reference/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Below is the structure of the generated project.
1515
├── src
1616
│   ├── main
1717
│   │   ├── java
18-
│   │   │   └── pacakge
18+
│   │   │   └── package
1919
│   │   │   ├── App.java
2020
│   │   │   ├── DependencyFactory.java
2121
│   │   │   └── Handler.java
2222
│   │   └── resources
2323
│   │   └── simplelogger.properties
2424
│   └── test
2525
│   └── java
26-
│   └── pacakge
26+
│   └── package
2727
│   └── HandlerTest.java
2828
```
2929

3030
- `App.java`: main entry of the application
31-
- `DependencyFactory.java`: contains the SDK client
31+
- `DependencyFactory.java`: creates the SDK client
3232
- `Handler.java`: you can invoke the api calls using the SDK client here.
3333

3434
#### Building the project

archetypes/archetype-app/src/test/resources/projects/apachehttpclientwithoutnativeimage/reference/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Below is the structure of the generated project.
1515
├── src
1616
│   ├── main
1717
│   │   ├── java
18-
│   │   │   └── pacakge
18+
│   │   │   └── package
1919
│   │   │   ├── App.java
2020
│   │   │   ├── DependencyFactory.java
2121
│   │   │   └── Handler.java
2222
│   │   └── resources
2323
│   │   └── simplelogger.properties
2424
│   └── test
2525
│   └── java
26-
│   └── pacakge
26+
│   └── package
2727
│   └── HandlerTest.java
2828
```
2929

3030
- `App.java`: main entry of the application
31-
- `DependencyFactory.java`: contains the SDK client
31+
- `DependencyFactory.java`: creates the SDK client
3232
- `Handler.java`: you can invoke the api calls using the SDK client here.
3333

3434
#### Building the project

archetypes/archetype-app/src/test/resources/projects/nettyclient/reference/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Below is the structure of the generated project.
1515
├── src
1616
│   ├── main
1717
│   │   ├── java
18-
│   │   │   └── pacakge
18+
│   │   │   └── package
1919
│   │   │   ├── App.java
2020
│   │   │   ├── DependencyFactory.java
2121
│   │   │   └── Handler.java
2222
│   │   └── resources
2323
│   │   └── simplelogger.properties
2424
│   └── test
2525
│   └── java
26-
│   └── pacakge
26+
│   └── package
2727
│   └── HandlerTest.java
2828
```
2929

3030
- `App.java`: main entry of the application
31-
- `DependencyFactory.java`: contains the SDK client
31+
- `DependencyFactory.java`: creates the SDK client
3232
- `Handler.java`: you can invoke the api calls using the SDK client here.
3333

3434
#### Building the project

archetypes/archetype-app/src/test/resources/projects/urlhttpclient/reference/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Below is the structure of the generated project.
1515
├── src
1616
│   ├── main
1717
│   │   ├── java
18-
│   │   │   └── pacakge
18+
│   │   │   └── package
1919
│   │   │   ├── App.java
2020
│   │   │   ├── DependencyFactory.java
2121
│   │   │   └── Handler.java
2222
│   │   └── resources
2323
│   │   └── simplelogger.properties
2424
│   └── test
2525
│   └── java
26-
│   └── pacakge
26+
│   └── package
2727
│   └── HandlerTest.java
2828
```
2929

3030
- `App.java`: main entry of the application
31-
- `DependencyFactory.java`: contains the SDK client
31+
- `DependencyFactory.java`: creates the SDK client
3232
- `Handler.java`: you can invoke the api calls using the SDK client here.
3333

3434
#### Building the project

archetypes/archetype-lambda/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
</plugin>
120120

121121
<!-- workaround to copy the global.vm and serviceMapping.vm to the sub folders
122-
because gloabl.vm is not so global any more
122+
because global.vm is not so global any more
123123
see https://github.com/aws/aws-sdk-java-v2/issues/1981 -->
124124
<plugin>
125125
<artifactId>maven-resources-plugin</artifactId>

archetypes/archetype-tools/src/main/resources/global.vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#end
2121
#set ( $serviceClientVariable = $serviceClientPrefix.substring(0,1).toLowerCase() + $serviceClientPrefix.substring(1))
2222
#set( $regionEnum = $region.replace("-", "_").toUpperCase() )
23-
## map the client module name to the client class name and pacakge name
23+
## map the client module name to the client class name and package name
2424
#if( $httpClient == 'url-connection-client')
2525
#set ($httpClientClassName = 'UrlConnectionHttpClient')
2626
#set ($httpClientPackageName = 'urlconnection.' + $httpClientClassName)

buildspecs/archetype-native-image-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ phases:
1818
-DgroupId=com.test \
1919
-DnativeImage=true \
2020
-DartifactId=apache-project \
21+
-DhttpClient=apache-client \
2122
-Dservice=s3 \
2223
-DinteractiveMode=false
2324
- |

buildspecs/native-image-integ-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ phases:
55
build:
66
commands:
77
- mvn clean install -pl :sdk-native-image-test -P quick --am -T1C
8-
- mvn clean install -pl :bom-internal
8+
- mvn clean install -pl :bom-internal,:bom
99
- cd test/sdk-native-image-test
1010
- mvn clean package -P native-image
1111
- target/sdk-native-image-test

codegen/src/test/java/software/amazon/awssdk/codegen/naming/DefaultNamingStrategyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public void sharedModel_notProvidingPackageName_shouldUseServiceName() {
223223

224224

225225
@Test
226-
public void sharedModel_providingPackageName_shouldUseProvidedPacakgeName() {
226+
public void sharedModel_providingPackageName_shouldUseProvidedpackageName() {
227227
CustomizationConfig config = CustomizationConfig.create();
228228
ShareModelConfig shareModelConfig = new ShareModelConfig();
229229
shareModelConfig.setShareModelWith("foo");

test/sdk-native-image-test/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
## Description
44
This module contains a sample application using AWS SDK for Java 2.x, and it
5-
used to test GraalVM Native Image compilation.
5+
is used to test GraalVM Native Image compilation.
66

77
## How to run
88
```
9+
mvn clean install -pl :sdk-native-image-test -P quick --am
10+
11+
mvn clean install -pl :bom-internal,:bom
12+
913
cd test/sdk-native-image-test
1014
1115
# build the image

0 commit comments

Comments
 (0)