2

I'm having trouble building my project in IntelliJ using Lombok. Lombok appears to work fine until I go to build artifact, where I get this error any place that uses a Lombok getter.

However, the code that shows up error free here here:

I have annotation processing enabled, and lombok is a dependency. I can't seem to figure out why this is,

Knee Snap
  • 91
  • 2
  • What are you using to build the artifact? Is *it* aware of Lombok? – Makoto May 31 '17 at 03:00
  • Build -> Build Artifacts. Should be, I have it listed [here](http://i.imgur.com/D88e4TU.png). – Knee Snap May 31 '17 at 03:05
  • have you read this https://stackoverflow.com/questions/17729384/lombok-added-but-getters-and-setters-not-recognized-in-intellij-idea?rq=1 ? – zxcvc May 31 '17 at 03:16
  • Yep :/ I've already done everything listed there. – Knee Snap May 31 '17 at 03:21
  • Oh haha. Figured it out. I was using an old version of Lombok from when I setup everything in Eclipse. After I updated it to the latest version it works now :) – Knee Snap May 31 '17 at 03:34

2 Answers2

0

You should install Lombok Intellij Plugin to be able to build your project:

https://plugins.jetbrains.com/plugin/6317-lombok-plugin

ahmetcetin
  • 2,621
  • 1
  • 22
  • 38
0

If you are on OSX/ Mac, enable annotation processing (tick the checkbox) at these two places (Not sure about windows or any other platform).

1.) Intellij IDEA => Preferences => Compiler => Annotation Processors

2.) File => Other Settings => Default Settings => Compiler => Annotation Processors

And then

3.) Intellij IDEA => Preferences => Plugins => Browse Repositories => Search for "Lombok" => install plugin => Apply

4.) And then probably restart Intellij IDEA. (This goes without saying :) )

This is my IntelliJ IDEA and Mac Version - IntelliJ IDEA 2017.1.5 Build #IU-171.4694.70 --- Mac OS X 10.12

Community
  • 1
  • 1
so-random-dude
  • 15,277
  • 10
  • 68
  • 113