I have followed the tutorial here http://projectlombok.org/
but after adding import and @Data nothing happens.
Does it work on eclipse helios ?
I have followed the tutorial here http://projectlombok.org/
but after adding import and @Data nothing happens.
Does it work on eclipse helios ?
Don't forget to do to Project->Clean in eclipse to make sure that your classes are recompiled.
I ran into this problem due to the missing:
-vmargs -javaagent:lombok.jar -Xbootclasspath/a:lombok.jar
as well. What is not explicitly said neither here nor in the Lombok popup message, and was not obvious to me as someone who never before had to fiddle with the eclipse.ini, is that you are NOT supposed to add that line, but instead add the last two parts of that line after the first part, which is already in the eclipse.ini file. To better illustrate, the end of the file should look something like this (bold is what matters for Lombok, the rest might be different for you):
-vm
C:/Program Files/Java/jdk1.7.0_02/bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar
Copy the Lombok jar into your eclipse based IDE (Eclipse/STS etc-) install folder
.ini file for your IDEm2 repositorycp ~/.m2/repository/projectlombork/lombork-1.x.jar /path/to/IDE/lombok.jarEdit the .ini file in the install folder of your IDE and add the following lines below -vmargs.
-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar.ini file and the name of the jar lombok.jarRestart your IDE and rebuild/maven-update your project
This is for setup of lombok on Spring Tool Suite. Here is what I did on spring tool suite (sts-4.4.0.RELEASE) and lombok-1.18.10.jar (current latest version available in mavenrepository).
If having maven project, ensure lombok dependency added to it. Else you need manually add the jar to your project classpath.
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
Clean build the maven application. This will download lombok jar in your .m2 location by default from maven repository.
The path would be org\projectlombok\lombok\1.18.10\
Now open command prompt and navigate to the lombok path and execute command java -jar lombok-1.18.10.jar
C:\xxx\xxx\org\projectlombok\lombok\1.18.10>java -jar lombok-1.18.10.jar
Opens up lombok dialog box. If see message Can't find IDE
Click Specify location...
Provide the path to your STS root location
My case it is
C:\apps\sts-4.4.0.RELEASE\SpringToolSuite.exe
Install/Update
Install successful Click Quit Installer
Now in explorer navigate to your STS root path.
C:\apps\sts-4.4.0.RELEASE\
We see lombok.jar placed in the sts root path
Now edit in notepad SpringToolSuite4.ini file
We see following appended at the end
-javaagent:C:\apps\sts-4.4.0.RELEASE\lombok.jar
Start STS using SpringToolSuite4.exe
Clean, rebuild your project.
I had similar issue on MacBook Pro, I just followed the below link and issue got resolved. https://projectlombok.org/setup/eclipse
Steps followed:-
Eclipse Oxygen - after installation of Lombok according to the process described on the Lombok page, still could not use @Log annotation.
Solution : Project --> Properties - Enable annotation processing
It was little frustrating. But finally it got resolved for me with following solution.
The issue seems to be where "-javaagent:lombok.jar" is placed in your ini file. When i installed it through lombok installation. This line got added towards last parameters after -vmargs. When i moved it up next to -vmargs. the issue got resolved.
I am using windows 10. I followed below steps :
This resolved the issue for me.
I am using Eclipse Jee 2019-06 and this worked for me:
java -jar Lombok.jarC:\Users\<username>\eclipse\jee-2019-062\eclipse\eclipse.exe )Done.
For me, The cause is different. My project name in settings.gradle was different from project name in eclipse.
So make sure your eclipse project name is as same as rootProject.name in settings.gradle