This topic explains how to integrate Jtest with Lombok.
About Lombok
Lombok is a library that allows you to reduce the amount of boilerplate code you need to add to a Java project. By using Lombok annotations, you can automatically generate getters and setters for data objects, saving the time and effort of manually writing them from scratch. You can learn more about the Lombok library at https://projectlombok.org.
Supported Versions
Jtest supports Lombok versions 1.18.4 - 1.18.12.
Integrating Jtest with Lombok
To integrate Jtest with the Lombok library:
- Open a command line interface.
- Go to
<JTEST_INSTALL_DIR>/integration/lombok
. Execute the following command:
On Windows:gradlew installLombok --no-daemon
On Linux or Mac OS:
./gradlew installLombok --no-daemon
This will integrate Jtest with Lombok 1.8.12 available at https://projectlombok.org/downloads/lombok-1.18.12.jar.
To integrate Jtest with a different version of the Lombok library, specify the URL or path to your lombok.jar using the lombokLocation
command line option. For example:
On Windows:
gradlew installLombok -PlombokLocation=c:\downloads\lombok.jar --no-daemon
On Linux or Mac OS:
./gradlew installLombok -PlombokLocation=/home/account/downloads/lombok.jar --no-daemon
Known Limitations
- Jtest's Unit Test Assistant does not support Lombok.
- In rare cases, class modifications made by Lombok may prevent static analysis from reporting some rule violations due to a mismatch between the violation and the source code.
- Lombok 1.18.14 is not supported due to a bug in Lombok that prevents installation in Eclipse IDE. See https://github.com/rzwitserloot/lombok/issues/2599 for details.