Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli)的解决方法

问题:
maven项目在没有任何问题的情况下,运行main主方法报下列错误
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli)

idea 2020.1版本
尝试网上很多方法,没有解决问题

最后删除本地仓库中的 org.codehaus.mojo整个文件夹,运行main方法自动下载插件

[INFO] Scanning for projects...
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (21 kB at 16 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/maven-metadata.xml (773 B at 1.7 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/3.0.0/exec-maven-plugin-3.0.0.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/3.0.0/exec-maven-plugin-3.0.0.pom (14 kB at 49 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/mojo-parent/50/mojo-parent-50.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/mojo-parent/50/mojo-parent-50.pom (34 kB at 105 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/3.0.0/exec-maven-plugin-3.0.0.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/exec-maven-plugin/3.0.0/exec-maven-plugin-3.0.0.jar (68 kB at 105 kB/s)
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building ch04_hadoop 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:3.0.0:exec (default-cli) @ ch04_hadoop ---
  
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.560 s
[INFO] Finished at: 2020-12-17T09:53:51+08:00
[INFO] Final Memory: 18M/191M
[INFO] ------------------------------------------------------------------------

总结

猜测可能因为网络问题,插件下载不全

后续

程序main主方法可以正常运行,当程序代码错误时,job启动失败,也会报 org.codehaus.mojo插件问题,此时可以通过log4j日志定位错误信息修改代码在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值