Skip to content

Commit 6711409

Browse files
author
Pankaj Agrawal
committed
upgrade example project to java 11 and AspectjGradlePlugin to latest
1 parent 4715802 commit 6711409

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

docs/content/index.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ And configure the aspectj-maven-plugin to compile-time weave (CTW) the aws-lambd
7979
```groovy
8080
plugins{
8181
id 'java'
82-
id 'aspectj.AspectjGradlePlugin' version '0.0.3'
82+
id 'aspectj.AspectjGradlePlugin' version '0.0.6'
8383
}
8484
repositories {
8585
jcenter()
@@ -94,8 +94,10 @@ dependencies {
9494
}
9595
```
9696

97-
**Note:** Please add `aspectjVersion = '1.9.6'` to the `gradle.properties` file. The aspectj plugin works at the moment with gradle 5.x only.
98-
Please refer to [open issue](https://github.com/awslabs/aws-lambda-powertools-java/issues/146) for more details.
97+
**Note:**
98+
99+
Please add `aspectjVersion = '1.9.6'` to the `gradle.properties` file. The aspectj plugin works at the moment with gradle 5.x only if
100+
you are using `java 8` as runtime. Please refer to [open issue](https://github.com/awslabs/aws-lambda-powertools-java/issues/146) for more details.
99101

100102
## Environment variables
101103

example/HelloWorldFunction/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins{
22
id 'java'
3-
id 'aspectj.AspectjGradlePlugin' version '0.0.3'
3+
id 'aspectj.AspectjGradlePlugin' version '0.0.6'
44
}
55

66
repositories {
@@ -23,6 +23,9 @@ dependencies {
2323
implementation 'software.amazon.lambda:powertools-parameters:1.0.0'
2424
aspectpath 'software.amazon.lambda:powertools-parameters:1.0.0'
2525

26+
implementation 'software.amazon.lambda:powertools-validation:1.0.0'
27+
aspectpath 'software.amazon.lambda:powertools-validation:1.0.0'
28+
2629
implementation 'com.amazonaws:aws-lambda-java-core:1.2.0'
2730
implementation 'com.amazonaws:aws-lambda-java-events:3.1.0'
2831

example/HelloWorldFunction/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<packaging>jar</packaging>
88
<name>A sample Hello World created for SAM CLI.</name>
99
<properties>
10-
<maven.compiler.source>1.8</maven.compiler.source>
11-
<maven.compiler.target>1.8</maven.compiler.target>
10+
<maven.compiler.source>11</maven.compiler.source>
11+
<maven.compiler.target>11</maven.compiler.target>
1212
<log4j.version>2.13.2</log4j.version>
1313
</properties>
1414

@@ -80,9 +80,9 @@
8080
<build>
8181
<plugins>
8282
<plugin>
83-
<groupId>org.codehaus.mojo</groupId>
83+
<groupId>com.nickwongdev</groupId>
8484
<artifactId>aspectj-maven-plugin</artifactId>
85-
<version>1.11</version>
85+
<version>1.12.6</version>
8686
<configuration>
8787
<source>${maven.compiler.source}</source>
8888
<target>${maven.compiler.target}</target>

example/template.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Resources:
1616
Properties:
1717
CodeUri: HelloWorldFunction
1818
Handler: helloworld.App::handleRequest
19-
Runtime: java8
19+
Runtime: java11
2020
MemorySize: 512
2121
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
2222
Variables:
@@ -35,7 +35,7 @@ Resources:
3535
Properties:
3636
CodeUri: HelloWorldFunction
3737
Handler: helloworld.AppValidation::handleRequest
38-
Runtime: java8
38+
Runtime: java11
3939
MemorySize: 512
4040
Tracing: Active
4141
Events:
@@ -50,7 +50,7 @@ Resources:
5050
Properties:
5151
CodeUri: HelloWorldFunction
5252
Handler: helloworld.AppStream::handleRequest
53-
Runtime: java8
53+
Runtime: java11
5454
MemorySize: 512
5555
Tracing: Active
5656
Environment:
@@ -68,7 +68,7 @@ Resources:
6868
Properties:
6969
CodeUri: HelloWorldFunction
7070
Handler: helloworld.AppParams::handleRequest
71-
Runtime: java8
71+
Runtime: java11
7272
MemorySize: 512
7373
Tracing: Active
7474
Policies:
@@ -148,7 +148,7 @@ Resources:
148148
Properties:
149149
CodeUri: HelloWorldFunction
150150
Handler: helloworld.AppSqsEvent::handleRequest
151-
Runtime: java8
151+
Runtime: java11
152152
MemorySize: 512
153153
Tracing: Active
154154
Policies:
@@ -174,7 +174,7 @@ Resources:
174174
Properties:
175175
CodeUri: HelloWorldFunction
176176
Handler: helloworld.AppSqsEventUtil::handleRequest
177-
Runtime: java8
177+
Runtime: java11
178178
MemorySize: 512
179179
Tracing: Active
180180
Policies:

0 commit comments

Comments
 (0)