Maven Apache - 终端错误 [无法访问 class com.sun.tools.javac.processing.JavacProcessingEnvironment]

Maven Apache - Terminal error [cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment]

我正在调试一个不是我的代码,因为第一次使用 Maven Apache 编译我得到这个错误。有没有人设法解决它? 我假设 pom 文件中存在可压缩性问题。

[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

更改maven版本

<properties>
 <maven.compiler.source>your version</maven.compiler.source>
 <maven.compiler.target>your version</maven.compiler.target>
</properties>

如果错误仍然存​​在,请更改 Lombok 的版本。 Link Lombok version 最新的 Lombok 版本