Lombok problems with Eclipse Oxygen

Lombok does not work for Eclipse Neon

 - You should not just "restart" Eclipse, go to File -> Exit and then
   open it again.
 - Don't forget to do a mvn clean just to make sure that you recompiled your classes. 
 - After all this you should also right-click on your project, then Maven -> Update Project

I had exactly the same problem with Alex. My eclipse version is

Version: Oxygen.1a Release (4.7.1a) Build id: 20171005-1200

I installed lombok 1.16.18, after checking it was already installed and also javaagent line was added to my eclipse.ini file.

Every thing was fine except that there are compilation errors where getter is called in the project. It's awkward but I fixed by :

  1. Cleaning project

  2. Building project

  3. Restarting eclipse a few times

Nothing else.


For MacBook Pro users (e.g. running macOs Sierra v10.12.6), in order to install lombok on Eclipse Oxygen (4.7.0) or Photon (4.8.0), using Java 1.8 (1.8.0_144), just do the following actions:

  1. Download lombok from the site Project Lombok;
  2. Close your Eclipse IDE if it is open;
  3. Trigger lombok installation either by following the official installation steps or by executing the command: java -jar lombok.jar;
  4. If the lombok installer doesn't find your Eclipse IDE, you will be requested to enter the path to your Eclipse. You should input the path to your eclipse.ini file. In my case was /tools/ide/eclipse/jee-oxygen/Eclipse.app/Contents/Eclipse/eclipse.ini.
  5. Quit the installer and open Eclipse.
  6. On the menu bar, go to Eclipse > About Eclipse and validate that lombok is installed:

    Lombok v1.16.18 "Dancing Elephant" is installed. https://projectlombok.org/
    

    Be sure to scroll the text window down since the installed Lombok version appears in the text above the row of icons.

  7. Finally, add lombok to your project's build path according to the building tool you're using. For Maven, for instance, use the following dependency:

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.16.18</version>
        <scope>provided</scope>
    </dependency>
    

My env: java version "1.8.0_144"

Eclipse: Eclipse Java EE IDE for Web Developers. Version: Oxygen Release (4.7.0) Build id: 20170620-1800

  1. Exit Eclipse(if it is open) and downloaded jar from https://projectlombok.org/download

  2. execute command: java -jar lombok.jar

  3. This command will open window as shown here https://projectlombok.org/setup/eclipse, install and quit the installer.

  4. Add jar to build path/add it to pom.xml.

    e.g. for Gradle build

 annotationProcessor("org.projectlombok:lombok")
 compileOnly("org.projectlombok:lombok")
  1. restart eclipse.
  2. Go to Eclipse --> About Eclipse --> check 'Lombok v1.16.18 "Dancing Elephant" is installed. https://projectlombok.org/'
  3. To enable Lombok for the project: Enable annotation processing in the respective IDE. That's it. It worked. I did not change eclipse init script.

Note: Read the note in following image regarding -vm options If you start Eclipse with a custom -vm parameter, you'll need to add:

-vmargs -javaagent:<path-to-lombok-jar>/lombok.jar

as parameter as well

Above steps works for Photon Release (4.8.0) - Lombok v1.18.2, eclipse: Oxygen.3a Release (4.7.3a) - Lombok v1.18.0 and eclipse: Neon.3 Release (4.6.3) - Lombok v1.18.2

lombok success screen: enter image description here

fyi,
For JDK - 10 and 11 support: Lombok version should be at least v1.18.4 (October 30th, 2018) or higher.

Tags:

Eclipse

Lombok