Skip to content

Commit 190a5f2

Browse files
committed
update doc on annotation usage and installation
1 parent 6c6c8e3 commit 190a5f2

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

docs/content/utilities/parameters.mdx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,4 +308,63 @@ public class AppWithAnnotation implements RequestHandler<APIGatewayProxyRequestE
308308
ObjectToDeserialize value;
309309

310310
}
311-
```
311+
```
312+
313+
### Install
314+
315+
If you want to use the ```@Param``` annotation in your project add configuration to compile-time weave (CTW) the powertools-parameters aspects into your project.
316+
For more information about the annotation refer to [this section]((./parameters#Annotation))
317+
318+
* [maven](https://maven.apache.org/):
319+
```xml
320+
<build>
321+
<plugins>
322+
...
323+
<plugin>
324+
<groupId>org.codehaus.mojo</groupId>
325+
<artifactId>aspectj-maven-plugin</artifactId>
326+
<version>1.11</version>
327+
<configuration>
328+
...
329+
<aspectLibraries>
330+
...
331+
<aspectLibrary>
332+
<groupId>software.amazon.lambda</groupId>
333+
<artifactId>powertools-parameters</artifactId>
334+
</aspectLibrary>
335+
</aspectLibraries>
336+
</configuration>
337+
<executions>
338+
<execution>
339+
<goals>
340+
<goal>compile</goal>
341+
</goals>
342+
</execution>
343+
</executions>
344+
</plugin>
345+
...
346+
</plugins>
347+
</build>
348+
```
349+
**Note:** If you are working with lambda function on runtime post java8, please refer [issue](https://github.com/awslabs/aws-lambda-powertools-java/issues/50) for workaround
350+
351+
* [gradle](https://gradle.org):
352+
```groovy
353+
plugins{
354+
id 'java'
355+
id 'aspectj.AspectjGradlePlugin' version '0.0.6'
356+
}
357+
repositories {
358+
jcenter()
359+
}
360+
dependencies {
361+
...
362+
implementation 'software.amazon.lambda:powertools-parameters:1.0.1'
363+
aspectpath 'software.amazon.lambda:powertools-parameters:1.0.1'
364+
}
365+
```
366+
367+
**Note:**
368+
369+
Please add `aspectjVersion = '1.9.6'` to the `gradle.properties` file. The aspectj plugin works at the moment with gradle 5.x only if
370+
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.

0 commit comments

Comments
 (0)