在parent module(我自己命名为ad-app,和老师的例子不一样)目录下跑mvn clean package -Dmaven.test.skip=true -U
打包失败,具体log以下:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ad-app [pom]
[INFO] ad-eureka [jar]
[INFO]
[INFO] ------------------------< com.imooc.ad:ad-app >-------------------------
[INFO] Building ad-app 1.0-SNAPSHOT [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ad-app ---
[INFO]
[INFO] -----------------------< com.imooc.ad:ad-eureka >-----------------------
[INFO] Building ad-eureka 1.0-SNAPSHOT [2/2]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ad-eureka ---
[INFO] Deleting /Users/xuanzima/Developer/Imooc/ad-app/ad-eureka/target
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ ad-eureka ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ ad-eureka ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/xuanzima/Developer/Imooc/ad-app/ad-eureka/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for ad-app 1.0-SNAPSHOT:
[INFO]
[INFO] ad-app ............................................. SUCCESS [ 0.070 s]
[INFO] ad-eureka .......................................... FAILURE [ 0.681 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.862 s
[INFO] Finished at: 2022-02-06T22:19:22-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project ad-eureka: Fatal error compiling: java.lang.ExceptionInInitializerError: Unable to make field private com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs accessible: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module @22c75c01 -> [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 <args> -rf :ad-eureka
请问老师这种情况该如何解决呢?谢谢老师!