Issue
I'm debugging a code not mine, as the first compilation with Maven Apache I get this error. Has anyone managed to fix it? I assume there is a compactability problem in the pom file.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project mysalepro-common: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x3cd95b79) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x3cd95b79 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Solution
Change maven version
<properties>
<maven.compiler.source>your version</maven.compiler.source>
<maven.compiler.target>your version</maven.compiler.target>
</properties>
if error still persists change the version of Lombok. Link Lombok version for the latest Lombok version
Answered By - Zakir Hussain
Answer Checked By - Terry (JavaFixing Volunteer)