请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

打包失败 ad-eureka FAILURE

在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

请问老师这种情况该如何解决呢?谢谢老师!

正在回答 回答被采纳积分+3

插入代码

1回答

张勤一 2022-02-07 17:28:49

同学你好:

    看报错应该是 pom 文件写的有问题吧,直接粘贴我的 pom 就行,不需要做任何的修改。

1 回复 有任何疑惑可以回复我~
  • pom文件完全一致,也遇到了相同的问题,求问如何解决
    回复 有任何疑惑可以回复我~ 2022-06-06 06:32:14
  • 我也遇到了一样的问题!请问如何解决(包括运行老师的代码好像也会报这个错)
    回复 有任何疑惑可以回复我~ 2022-07-07 10:40:02
  • 已解决。是lombok版本过低,在父工程里手动把lombok版本调至最高然后reload pom文件即可。
    回复 有任何疑惑可以回复我~ 2022-07-07 11:05:26

相似问题

登录后可查看更多问答,登录/注册

问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信