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

前言

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

错误分析

首先看一下报错误的全部内容:

java 复制代码
[ERROR] 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) -> [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:

这个错误是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!

问题解决

我们先检查pom.xml中frontend-maven-plugin的配置,确保所有必要的配置都已正确设置。

既然这两个插件有问题,那么我们就给它解决掉,使用标签给它注释掉: 注释完成后,发现这一招确实有效:

本篇文章到这里就结束了,后续会继续分享RocketMQ相关的知识,感谢各位小伙伴们的支持!

相关推荐
moxiaoran57531 小时前
Go语言的错误处理
开发语言·后端·golang
短剑重铸之日7 小时前
《7天学会Redis》特别篇: Redis分布式锁
java·redis·分布式·后端·缓存·redission·看门狗机制
小北方城市网7 小时前
SpringBoot 全局异常处理与接口规范实战:打造健壮可维护接口
java·spring boot·redis·后端·python·spring·缓存
hanqunfeng7 小时前
(三十三)Redisson 实战
java·spring boot·后端
小北方城市网8 小时前
SpringBoot 集成 MyBatis-Plus 实战(高效 CRUD 与复杂查询):简化数据库操作
java·数据库·人工智能·spring boot·后端·安全·mybatis
hanqunfeng9 小时前
(四十)SpringBoot 集成 Redis
spring boot·redis·后端
小北方城市网10 小时前
SpringBoot 集成 MinIO 实战(对象存储):实现高效文件管理
java·spring boot·redis·分布式·后端·python·缓存
程序员泠零澪回家种桔子10 小时前
RAG自查询:让AI精准检索的秘密武器
人工智能·后端·算法
曹轲恒10 小时前
SpringBoot配置文件(1)
java·spring boot·后端
小北方城市网11 小时前
SpringBoot 安全认证实战(Spring Security + JWT):打造无状态安全接口体系
数据库·spring boot·后端·安全·spring·mybatis·restful