My project builds successfully with mvn clean install -U
, but when building the same project in IntelliJ I get java: package lombok.extern.sl.. does not exist
. I have the lombok plugin installed but it can't recognize it. When trying to run test cases by hovering over the class, I see cannot resolve symbol...
How do I get IntelliJ to build my project?
Asked
Active
Viewed 121 times
1

Thorbjørn Ravn Andersen
- 73,784
- 33
- 194
- 347

ncisco3200
- 19
- 3
-
Have you done reload? What I already do with broken dependencies in IntelliJ is: mvn clean install -U (in the maven tab), maven reload (in the maven tab) and sometimes even a rebuild (from the menu). Also restart of IntelliJ and repeat all those steps. – Jens Apr 08 '23 at 13:11
-
I'm unable to clean or install through the maven tab within IntelliJ (error [FATAL] Non-resolvable parent POM for..), but I am able to do this through git bash (results in build success). This is because my settings.xml file is configured so no errors but my settings.xml file and path is disclosed within IntelliJ... – ncisco3200 Apr 08 '23 at 13:27
2 Answers
0
Check if the Lombok annotation processing is enabled in the IntelliJ compiler settings. Go to Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors, and make sure that "Enable annotation processing" is checked, and that "Obtain processors from project classpath" is selected.

Amila
- 168
- 1
- 11
-
I have both these checked already but am still getting java: package lombok.extern.sl.. does not exist. and "cannot resolve symbol.." – ncisco3200 Apr 08 '23 at 13:08
-
0
Please add following dependency to pom.xml
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<scope>provided</scope>
</dependency>

Mar-Z
- 2,660
- 2
- 4
- 16