maven构建失败
maven构建失败如上报错。

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] kxmall [pom]
[INFO] kxmall-common [jar]
[INFO] kxmall-framework [jar]
[INFO] kxmall-system [jar]
[INFO] kxmall-admin-api [jar]
[INFO] kxmall-app-api [jar]
[INFO] kxmall-rider-api [jar]
[INFO] kxmall-generator [jar]
[INFO] kxmall-admin [jar]
[INFO]
[INFO] -------------------------< com.kxmall:kxmall >--------------------------
[INFO] Building kxmall 3.0.0 [1/9]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ kxmall ---
[INFO] Installing E:\spaceGit\myGithub\kxmall3\pom.xml to C:\Users\Administrator.m2\repository\com\kxmall\kxmall\3.0.0\kxmall-3.0.0.pom
[INFO]
[INFO] ----------------------< com.kxmall:kxmall-common >----------------------
[INFO] Building kxmall-common 3.0.0 [2/9]
[INFO] from kxmall-common\pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ kxmall-common ---
[INFO] skip non existing resourceDirectory E:\spaceGit\myGithub\kxmall3\kxmall-common\src\main\resources
[INFO] skip non existing resourceDirectory E:\spaceGit\myGithub\kxmall3\kxmall-common\src\main\resources
[INFO]
[INFO] --- compiler:3.9.0:compile (default-compile) @ kxmall-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 154 source files to E:\spaceGit\myGithub\kxmall3\kxmall-common\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for kxmall 3.0.0:
[INFO]
[INFO] kxmall ............................................. SUCCESS [ 0.183 s]
[INFO] kxmall-common ...................................... FAILURE [ 3.769 s]
[INFO] kxmall-framework ................................... SKIPPED
[INFO] kxmall-system ...................................... SKIPPED
[INFO] kxmall-admin-api ................................... SKIPPED
[INFO] kxmall-app-api ..................................... SKIPPED
[INFO] kxmall-rider-api ................................... SKIPPED
[INFO] kxmall-generator ................................... SKIPPED
[INFO] kxmall-admin ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.277 s
[INFO] Finished at: 2024-10-01T10:22:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.9.0:compile (default-compile) on project kxmall-common: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [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
进程已结束,退出代码为 1
解决问题:
由于jdk版本太低或者太高。需要将jdk版本改成 1.8 (推荐)
即可解决问题。