记录生活中的点点滴滴

0%

maven打包报错

maven打包时报错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cloud-api-commons: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]

记录一下解决方案!

maven打包报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by lombok.javac.apt.LombokProcessor to field com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs
WARNING: Please consider reporting this to the maintainers of lombok.javac.apt.LombokProcessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.095 s
[INFO] Finished at: 2021-04-26T21:12:47+08:00
[INFO] Final Memory: 19M/70M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cloud-api-commons: 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

找了半个小时,还以为是版本号的原因:解决Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile

后续也猜是不是maven打包版本不是1.8,但是别的项目就可以打包成功,感觉应该不是maven的问题!

最后才发现是lombok的版本过低导致的

后续改了父项目的lombok的版本:

就他娘的解决了!!!

得,记下来吧!