1
votes

I am using Lombok in Eclipse Neon.3 in a maven project

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

When doing an Update Maven Project (Alt+F5) everything works nicely, but as soon as I change any file and save (build automatically), it gives errors that the used @Getters do not exist.

The plugin is correctly installed and I can see the line "Lombok v1.16.16 "Dancing Elephant" is installed. https://projectlombok.org/" in Eclipse About Dialog. I can also see the getters and setters in the outline of the class, but still the red error markers appear that the methods do not exist.

I did not find any answer what could be the reason. Can anybody help?

1
What is the exact compilation error message? Did you double-click the lombok.jar and install it on that eclipse? - user1803551
Yes lombok.jar was installed like that and works. Compilation errors are something like "The method getId() is undefined for the type Project". By the way I set up a new Eclipse installation (Oxygen) and there the problem does not occur. So my problem is basically solved, but still I would be interested in what configuration could break this. - Bruno Haller

1 Answers

0
votes

I am very late to the party, but I experienced the same issue with Lombok 1.18.8. In my case it helped to remove the corresponding jar from the local maven repository (I suspected some kind of faulty dependency) thus forcing a new download. Not sure if that really was the issue, but it seemed to have helped.