【问题标题】:Maven Apache - Terminal error [cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment]Maven Apache - 终端错误 [无法访问类 com.sun.tools.javac.processing.JavacProcessingEnvironment]
【发布时间】:2022-01-31 10:23:53
【问题描述】:

我正在调试一个不是我的代码,作为第一次使用 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

【问题讨论】:

标签: java maven maven-plugin


【解决方案1】:

更改 maven 版本

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

如果错误仍然存​​在,请更改 Lombok 的版本。链接Lombok version 获取最新的龙目岛版本

【讨论】:

  • 是的,它工作!我已将 Lombok 更新为最新版本。谢谢
猜你喜欢
  • 2021-06-22
  • 2022-06-17
  • 1970-01-01
  • 2021-11-02
  • 2013-08-17
  • 2017-11-04
  • 1970-01-01
  • 2020-09-29
  • 2017-09-17
相关资源
最近更新 更多