maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags

Posted 快乐崇拜234

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags相关的知识,希望对你有一定的参考价值。

欢迎关注本人公众号


错误日志:

[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>

以上是关于maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags的主要内容,如果未能解决你的问题,请参考以下文章

编译插件时:maven 报错

新建的maven项目直接用maven编译报错

maven编译报错 was cached in the local repository 拉包失败

maven clean后 编译报错

maven编译报错 was cached in the local repository 拉包失败

maven编译报错 -source 1.5 中不支持 lambda 表达式(转)