If you are using maven, try adding Lombok path to maven-compiler-plugin
list of annotation processor as shown below.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.3.0.Final</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Change the version as per your version of Lombok. Other than that ensure you have done the following
File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processor
. For me both, Obtain processors from project classpath
and Processor path
is working. So not sure what will work for you, but try whichever works.And rather than shooting in the dark for hours. Reading a little bit how annotation processors work and are used by compiler may help. so have quick read below.
http://hannesdorfmann.com/annotation-processing/annotationprocessing101