https://github.com/jeffque/lombok-compile-test-maven
https://github.com/jeffque/lombok-compile-test-maven
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffque/lombok-compile-test-maven
- Owner: jeffque
- Created: 2023-07-05T04:05:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-05T04:09:39.000Z (almost 3 years ago)
- Last Synced: 2025-06-12T22:06:08.107Z (about 1 year ago)
- Language: Java
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
lombok-compile-test
===============
This is a PoC that only setting lombok annotation
processor in `pluginManagement -> plugin ->
maven-compiler-plugin -> configuration` is enough.
test scenarios
-----------
The maven-compile-plugin is never added directly under
`build -> plugins`, but only its configuration is managed
by `build -> pluginManagement`.
There is the default configuration, which does not add
any annotation processor. It shall fail ugly when
compiling the project.
And there is the `lombok` profile. This only adds the
lombok annotation processor in the maven-compiler-plugin
configuration, it shall work nicely and beatifully.
And also there is the `internal-lombok` that is equals
to `lombok` profile, but only defined in the module that
uses lombok.
This shall fail:
```bash
./mvnw clean compile # always keeping it clean, it shall fail
./mvnw clean compile -P lombok # this shall succeed
./mvnw clean compile -P internal-ombok # this shall also succeed
```
why maven modules? why not simpler?
--------------
For some reason that I cannot explain, a simple, non
nested layout for maven project got everything compiling.
It could even be some mistake of my part.
Creating the modules was a way to check that the
compilation would be fine only if the annotation
processor is present.