2

I am using lombok API in my codebase to generate getter and setter functionality internally for DTO. Here is one example.

import lombok.Data;

@Data
public class TemplateDTO {
    private String templateId;

    private String templateName;

}

The issue is while using the get/set methods of TemplateDTO in my codebase eclipse is showing me error messages.

However maven install is working fine (if I run via the command line).

Is there anyway I can disable error messages in eclipse or is there anyway I can resolve getter and setter code?

I am using Eclipse Neon.2 Release (4.6.2) in OSX.

nagendra547
  • 5,672
  • 3
  • 29
  • 43

1 Answers1

3

I will answer this question myself. Thanks to lukjar and @MrSimpleMind response.

Just append following lines in eclipse.ini.

Basically add lombok.jar in your javaagent and Xbootclasspath arguments.

-Xbootclasspath/a:/Users/test/lombok/lombok.jar
-javaagent:/Users/test/lombok/lombok.jar

After this

  1. restart eclipse
  2. Run maven clean install
  3. Refresh eclipse workspace

It's good to go now.

nagendra547
  • 5,672
  • 3
  • 29
  • 43