Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: FAQs
description: Frequently Asked Questions
---


## How can I use Powertools with Lombok?

Poweretools uses `aspectj-maven-plugin` to compile-time weave (CTW) aspects into the project. In case you want to use `Lombok` or other compile-time preprocessor for your project, it is required to change `aspectj-maven-plugin` configuration to enable in-place weaving feature. Otherwise the plugin will ignore changes introduced by `Lombok` and will use `.java` files as a source.

To enable in-place weaving feature you need to use following `aspectj-maven-plugin` configuration:

```xml hl_lines="5"
Copy link
Copy Markdown
Contributor

@pankajagrawal16 pankajagrawal16 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is hl line number correct here? Seems to point to </weaveDirectories>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it. You are rigth - it was a bit confusing. I've changed it to highlight all 5 lines which needs to be added to configuration. I also added <forceAjcCompile>true</forceAjcCompile> which was not required when I tested in on my environment, but aspectj docs says that by default it's false so the code will not be recompiled.

Please let me know of you want me to squash commits before merge.

<configuration>
<sources/>
<weaveDirectories>
<weaveDirectory>${project.build.directory}/classes</weaveDirectory>
</weaveDirectories>
...
<aspectLibraries>
<aspectLibrary>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-logging</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ site_author: Amazon Web Services
nav:
- Homepage: index.md
- Changelog: changelog.md
- FAQs: FAQs.md
- Core utilities:
- core/logging.md
- core/tracing.md
Expand Down