maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags[通俗易懂]

maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags[通俗易懂]错误日志:[ERROR]Failedtoexecutegoalorg.apache.maven.plugins:maven-compiler-plugin:3.1:compile(default-compile)onprojecthelloworld:Fatalerrorcompiling:java.lang.ExceptionInInitializerError:c…

大家好,又见面了,我是你们的朋友全栈君。

欢迎关注本人公众号

在这里插入图片描述
错误日志:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :helloworld

原因是lombok版本太低,不支持java10以上。
到https://mvnrepository.com查询新版本即可

<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.4</version>
    <scope>provided</scope>
</dependency>
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/140425.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号