I downloaded Eclipse Luna and imported a stable existing Maven project which makes use of the @Getter and @Setter lombok annotations. The annotations are recognized, but Eclipse flags any calls to the getter or setter methods giving the error message
The method getSomething() is undefined for the type Foo
Unlike other stackoverflow questions, like this, I am experiencing this issue despite the fact that I have updated my eclipse.ini, and added the lombok.jar to the same directory as my eclipse.exe and eclipse.ini file. The eclipse.ini changes made no difference though, I still have error markets everywhere!
eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.7.0_51\bin\javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar
I have done a project > clean, I have tried using the full path to my lombok jar, I have exited and restarted Eclipse all to no avail.
What am I missing here? Thanks for any help!!!
Actually no real idea, but maybe something helps.
Eclipse uses its own compiler, while Maven probably uses javac
. So you normally have to get noth running and these two things are unrelated.
A single Eclipse restart was always sufficient for me.
Look in Help / About Eclipse SDK: Is there an Lombok entry?
My eclipse.ini contains absolute paths:
-javaagent:/home/maaartin/eclipse/lombok.jar
-Xbootclasspath/a:/home/maaartin/eclipse/lombok.jar
but relative path must work too. The question is "relative to what?".
Normally, Lombok can find your Eclipse install directory and install itself. You have to do it manually, only when using non-standard install directories.
Open the Error Log View, maybe there's something bad going on. Just in case, look at the log files on the disk, too.
I experienced this issue because the lombok version my project used, 0.9.3, was not supported in Eclipse Luna. I have upgraded my version to 1.14.8 and now everything is working as expected.
See how to configure lombok in eclipse luna for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With