已解决[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相关的知识,感谢各位小伙伴们的支持!

相关推荐
好好研究2 小时前
总结SSM设置欢迎页的方式
xml·java·后端·mvc
小马爱打代码3 小时前
Spring Boot:第三方 API 调用的企业级容错设计
java·spring boot·后端
csdn2015_4 小时前
springboot task
java·spring boot·后端
czlczl200209254 小时前
Spring Boot :如何高性能地在 Filter 中获取响应体(Response Body)
java·spring boot·后端
码界奇点5 小时前
基于Spring Boot和Vue3的无头内容管理系统设计与实现
java·spring boot·后端·vue·毕业设计·源代码管理
To Be Clean Coder6 小时前
【Spring源码】createBean如何寻找构造器(二)——单参数构造器的场景
java·后端·spring
你才是臭弟弟6 小时前
SpringBoot 集成MinIo(根据上传文件.后缀自动归类)
java·spring boot·后端
C澒6 小时前
面单打印服务的监控检查事项
前端·后端·安全·运维开发·交通物流
鸣潮强于原神6 小时前
TSMC chip_boundary宽度规则解析
后端
Code blocks7 小时前
kingbase数据库集成Postgis扩展
数据库·后端