Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation processors order note #3563

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions docs/asciidoc/modules/avaje-inject.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<version>...</version>
<configuration>
<annotationProcessorPaths>
<!-- if using lombok, it must be placed before the avaje-inject-generator -->
<!-- avaje-inject-generator must be placed before the jooby-apt -->
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject-generator</artifactId>
Expand All @@ -42,6 +44,11 @@ dependencies {
}
----

[NOTE]
====
Please note that the order of annotation processors is important. For example, if you're using `lombok` and `avaje-inject`, the correct order should be: `lombok` -> `avaje-inject` -> `jooby-apt`
====

3) Install Avaje Inject:

.Installing Avaje Inject
Expand Down
6 changes: 6 additions & 0 deletions docs/asciidoc/modules/avaje-validator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bean validation via https://avaje.io/validator/[Avaje Validator].
<version>...</version>
<configuration>
<annotationProcessorPaths>
<!-- if using lombok, it must be placed before the generator -->
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator-generator</artifactId>
Expand All @@ -46,6 +47,11 @@ dependencies {
}
----

[NOTE]
====
Please note that the order of annotation processors is important. For example, if you're using `lombok`, the correct order should be: `lombok` -> `avaje-validator`
====

3) Install

.Java
Expand Down
7 changes: 7 additions & 0 deletions docs/asciidoc/mvc-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,8 @@ on them (mostly annotations processors).
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<!-- if using lombok, it must be placed before the jooby-apt -->
<!-- if using avaje-inject, it must be placed after lombok, but before the jooby-apt -->
<path>
<groupId>io.jooby</groupId>
<artifactId>jooby-apt</artifactId>
Expand Down Expand Up @@ -980,3 +982,8 @@ tasks.withType(JavaCompile) {
]
}
----

[NOTE]
====
Please note that the order of annotation processors is important. For example, if you're using `lombok` and `avaje-inject`, the correct order should be: `lombok` -> `avaje-inject` -> `jooby-apt`
====
2 changes: 2 additions & 0 deletions modules/jooby-cli/src/main/resources/cli/pom.xml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
{{#if apt}}
<configuration>
<annotationProcessorPaths>
<!-- if using lombok, it must be placed before the jooby-apt -->
<!-- if using avaje-inject, it must be placed after lombok, but before the jooby-apt -->
<path>
<groupId>io.jooby</groupId>
<artifactId>jooby-apt</artifactId>
Expand Down