I just tried to send a Maven-based project to another computer and HORROR, red markers everywhere!!
However, mvn clean install
is building just fine.
When starting with a fresh eclipse installation you, in fact, need to "install" Lombok before being able to use it.
~/.m2/repository/org/projectlombok/lombok/1.16.10/lombok-1.16.10.jar
), run it (Example: java -jar lombok-1.16.10.jar
). A window should appear, browse to your eclipse.exe
location.1) Run the command java -jar lombok-1.16.10.jar
. This needs to be run from the directory of your lombok.jar file.
2) Add the location manually by selecting the eclipse.ini file(Installed eclipse directory). Through “Specify location”
Note : Don't add the eclipse.exe because it will make the eclipse editor corrupt.
How to add the eclipse.ini file
When using lombok on a fresh installation of Eclipse or STS, you have to:
Install the lombok jar which you can get at https://projectlombok.org/download. Run the jar (as Administrator if using windows) and specify the path to your Eclipse/STS installation.
Restart your IDE (Eclipse or STS)
Give some time for eclipse to generate the class files for lombok (Might take a up to 4 mins in some cases)
Download Lombok Jar File https://projectlombok.org/downloads/lombok.jar
Add maven dependency:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
</dependency>
Start Lombok Installation java -jar lombok-1.16.18.jar
find complete example in this link:
https://howtodoinjava.com/automation/lombok-eclipse-installation-examples/
If you use STS. You must have Lombok installed in your Eclipse by running lombok-abc.jar
Please Following the Steps:
-Include pom in Maven . -Exit/Shutdown STS(must) -Find lombok Jar in ~.m2\repository\org\projectlombok\lombok\1.18.12 -From Command
After then
After then select the STS.exe
After then click to update/update
then Quit Installer
Happy Coding
Blockquote
For Spring ToolSuite 4 on Mac, they renamed the ini to SpringToolSuite4.ini.
You can either rename or copy it to STS.ini to be recognized by lombok. Then copy it back to the original name to be read by the IDE. (Haven't tried if symbolic links work though.)