'Error while building project using maven [com/sun/tools/javac/tree/JCTree$JCCompilationUnit]

I am trying to use maven to build my java project, but I always get the error message,

> Execution default of goal org.projectlombok:lombok-maven-plugin:1.18.10.0:delombok failed: A required class was missing while executing org.projectlombok:lombok-maven-plugin:1.18.10.0:delombok: com/sun/tools/javac/tree/JCTree$JCCompilationUnit

I used Java8, maven3. Does anyone know how to fix such issue?



Solution 1:[1]

Sorry, I think I fixed this issue finally. The mistake I made was that I pointed to JAVA_HOME to the JRE directory. After re-direct JAVA_HOME to the JDK directory, this issue is fixed.

Solution 2:[2]

In intelij, Setting>Build>Java compiler> & Project setting> fix JDK version

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jade
Solution 2 Tohid Makari