天津储鑫盛钢材现货供应商 发表于 2024-9-28 19:10:21

已解决[ERROR] Failed to execute goal com.github.eirslett:frontend-mave

媒介

如题,在下载解压,修改好rocketmq-dashboard的配置后,预备使用 java -jar rocketmq-dashboard-1.0.1-SNAPSHOT.jar命令构建打包时,打了二十多分钟后出现了这个错误使得打包失败,因此本篇文章主要记录下这个错误,为遇到这个错误的小同伴儿们提供些帮助!
https://i-blog.csdnimg.cn/direct/246fafa407fc49c5895484069556a2fb.jpeg
错误分析

首先看一下报错误的全部内容:
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:yarn (yarn install) on project rocketmq-dashboard: Failed to run task: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) ->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
这个错误是Maven构建过程中,在执行frontend-maven-plugin插件的yarn install任务时出现了问题。搞前端的佬应该都知道这个,frontend-maven-plugin是一个用于在Maven项目中集成前端构建工具的插件,它可以让我们在Maven的生命周期中运行如npm、yarn等命令。
MojoFailureException 是Maven中的一个常见错误,它表现一个Maven Mojo(插件的目标)执行失败。比如我我们遇到的这个案例中,失败的Mojo是com.github.eirslett:frontend-maven-plugin:1.11.3:yarn。
Failed to run task: ‘yarn install’ failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) 这表明yarn install命令执行失败,并且这个历程以错误码1退出。
注意:在Unix和类Unix系统中,命令执行失败通常会返回一个非零的退出码,其中1通常表现有错误发生。
错误解析结束后,我们来解决这个Bug!
https://i-blog.csdnimg.cn/direct/7df0756848924036b6f8651a629cffcf.jpeg
问题解决

我们先检查pom.xml中frontend-maven-plugin的配置,确保所有必要的配置都已正确设置。
https://i-blog.csdnimg.cn/direct/ccc744e0ce7b4456a99cfad5b9783a51.png
既然这两个插件有问题,那么我们就给它解决掉,使用标签给它注释掉:
https://i-blog.csdnimg.cn/direct/c740dd40ebd84bb9bef74dc73ee37fb4.png
注释完成后,发现这一招确实有效:
https://i-blog.csdnimg.cn/direct/c1b9fcffb9d34829811bf62c278379cf.png
本篇文章到这里就结束了,后续会继续分享RocketMQ相干的知识,感谢各位小同伴们的支持!
https://i-blog.csdnimg.cn/blog_migrate/13710ba75f88fb45ae8bbcee93301cc9.gif#pic_center

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 已解决[ERROR] Failed to execute goal com.github.eirslett:frontend-mave