Lombok annotations do not compile under Intellij idea

yurnom picture yurnom · Jun 3, 2014 · Viewed 222.6k times · Source
  1. I've installed the plugin for intellij idea(lombok-plugin-0.8.6-13).
  2. Added lombok.jar into classpath
  3. I can find getters and setters in the window of structure. And Intellij shows no error.
  4. Setting - Lombok plugin - Verified Intellij configuration for lombok, it shows that "configuration of IntelliJ seems to be ok".

It seems everything is OK. But when I compile a test, errors come: can not find the methods getXXX and setXXX.

I opened the .class file with IntelliJ and find out that there is no setXXX and getXXX methods.

Could somebody tell me why?

  • plugin:lombok-plugin-0.8.6-13
  • lombok.jar:1.14.0
  • idea:13.0.2 for linux
  • jdk:1.7.0_21

Answer

mike picture mike · Dec 11, 2014

In order to solve the problem set:

  • Preferences (Ctrl + Alt + S)
    • Build, Execution, Deployment
      • Compiler
        • Annotation Processors
          • Enable annotation processing

Make sure you have the Lombok plugin for IntelliJ installed!

  • Preferences -> Plugins
  • Search for "Lombok Plugin"
  • Click Browse repositories...
  • Choose Lombok Plugin
  • Install
  • Restart IntelliJ