Configure lombok in eclipse
While using lombok in eclipse , you might encounter error like Slf4j log variable is not recognised by lombok in eclipse
Steps to properly configure lombok in eclispe ide is as follows:
- Ensure that lombok dependency is present in pom.xml file
<!-- lombok dependency. -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
2. Download lombok jar from link
https://projectlombok.org/downloads/lombok.jar
3. Install Lombok
- Goto the jar location from the command prompt and run the following command java -jar lombok-1.16.18.jar and we should be greeted by Lombok installation window.
- Now click on the “Specify Location” button and locate the eclipse.exe path under eclipse installation folder like this.
- Now click the “Install/Update”.
The above install basically copies the executable jar to the eclipse executable folder and makes a configuration update in your IDE
.ini
configuration file something like below:-javaagent:/home/myuser/eclipse/jee-2022-03/eclipse/lombok.jar
4. Active annotation processing in select project (not the parent)
Right click Project -> properties -> Java compiler -> annotation processing Select Enable project specific settings Select all Enable checkbox
5. Restart eclipse
Resources: