简体   繁体   中英

Lombok IntelliJ integration

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,

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM