RocketMQ Console安装时报Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17错误

本文主要是介绍RocketMQ Console安装时报Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17错误,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

RocketMQ 编译Console时遇到的坑

明确1:spring-boot-starter-parent的版本2.1.3.RELEASE
明确2:项目开发中使用的RocketMQ版本,这里,我使用4.4.0,记着
是Apache项目,不是阿里的包
第一步:
打开github上下载的rocketmq-externals-master,进入到rocketmq-externals-master\rocketmq-console下面,打开如下路径rocketmq-externals-master\rocketmq-console\src\main\resources,修改为如下配置

server.contextPath=/rocketmq
server.port=8080
#spring.application.index=true
spring.application.name=rocketmq-console
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
logging.config=classpath:logback.xml
#if this value is empty,use env value rocketmq.config.namesrvAddr  NAMESRV_ADDR | now, you can set it in ops page.default localhost:9876
rocketmq.config.namesrvAddr=127.0.0.1:9876
#if you use rocketmq version < 3.5.8, rocketmq.config.isVIPChannel should be false.default true
rocketmq.config.isVIPChannel=
#rocketmq-console's data path:dashboard/monitor
rocketmq.config.dataPath=/tmp/rocketmq-console/data
#set it false if you don't want use dashboard.default true
rocketmq.config.enableDashBoardCollect=true
#set the message track trace topic if you don't want use the default one
rocketmq.config.msgTrackTopicName=

第二步:修改pom.xml,更改spring-boot-starter-parent的版本和rocketmq版本,并且删掉如下plugins

<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-checkstyle-plugin</artifactId><version>2.17</version><executions><execution><id>validate</id><phase>validate</phase><configuration><excludes>src/main/resources</excludes><configLocation>style/rmq_checkstyle.xml</configLocation><encoding>UTF-8</encoding><consoleOutput>true</consoleOutput><failsOnError>true</failsOnError></configuration><goals><goal>check</goal></goals></execution></executions></plugin>

修改完代码如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.1.3.RELEASE</version></parent><groupId>org.apache</groupId><artifactId>rocketmq-console-ng</artifactId><packaging>jar</packaging><version>1.0.0</version><name>rocketmq-console-ng</name><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><java.version>1.7</java.version><guava.version>16.0.1</guava.version><commons-digester.version>2.1</commons-digester.version><commons-lang.version>2.6</commons-lang.version><commons-io.version>2.4</commons-io.version><commons-cli.version>1.2</commons-cli.version><rocketmq.version>4.4.0-SNAPSHOT</rocketmq.version><surefire.version>2.19.1</surefire.version><aspectj.version>1.6.11</aspectj.version><main.basedir>${basedir}/../..</main.basedir><docker.image.prefix>styletang</docker.image.prefix></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>commons-collections</groupId><artifactId>commons-collections</artifactId><version>3.2.2</version></dependency><dependency><groupId>org.apache.rocketmq</groupId><artifactId>rocketmq-tools</artifactId><version>4.4.0</version></dependency><dependency><groupId>org.apache.rocketmq</groupId><artifactId>rocketmq-namesrv</artifactId><version>4.4.0</version></dependency><dependency><groupId>org.apache.rocketmq</groupId><artifactId>rocketmq-broker</artifactId><version>4.4.0</version></dependency><dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>${guava.version}</version></dependency><dependency><groupId>org.aspectj</groupId><artifactId>aspectjrt</artifactId><version>${aspectj.version}</version></dependency><dependency><groupId>org.aspectj</groupId><artifactId>aspectjweaver</artifactId><version>${aspectj.version}</version></dependency><!-- Spring AOP + AspectJ --><dependency><groupId>cglib</groupId><artifactId>cglib</artifactId><version>2.2.2</version></dependency><dependency><groupId>org.jooq</groupId><artifactId>joor</artifactId><version>0.9.6</version></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin><plugin><groupId>com.spotify</groupId><artifactId>docker-maven-plugin</artifactId><version>0.4.11</version><configuration><imageName>${docker.image.prefix}/${project.artifactId}</imageName><dockerDirectory>src/main/docker</dockerDirectory><resources><resource><targetPath>/</targetPath><directory>${project.build.directory}</directory><include>${project.build.finalName}.jar</include></resource></resources><imageTags><imageTag>${project.version}</imageTag><imageTag>latest</imageTag></imageTags></configuration></plugin><plugin><artifactId>maven-surefire-plugin</artifactId><version>${surefire.version}</version><configuration><excludes><exclude>src/test/**</exclude></excludes><forkCount>1</forkCount><reuseForks>true</reuseForks></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-failsafe-plugin</artifactId><version>2.19.1</version><configuration><forkCount>1</forkCount><reuseForks>true</reuseForks><argLine>@{failsafeArgLine}</argLine><includes><include>src/test/**</include></includes></configuration><executions><execution><goals><goal>integration-test</goal><goal>verify</goal></goals></execution></executions></plugin><plugin><artifactId>maven-source-plugin</artifactId><version>3.0.1</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.jacoco</groupId><artifactId>jacoco-maven-plugin</artifactId><version>0.7.9</version><executions><execution><id>default-prepare-agent</id><goals><goal>prepare-agent</goal></goals><configuration><destFile>${project.build.directory}/jacoco.exec</destFile></configuration></execution><execution><id>default-prepare-agent-integration</id><phase>pre-integration-test</phase><goals><goal>prepare-agent-integration</goal></goals><configuration><destFile>${project.build.directory}/jacoco-it.exec</destFile><propertyName>failsafeArgLine</propertyName></configuration></execution><execution><id>default-report</id><goals><goal>report</goal></goals></execution><execution><id>default-report-integration</id><goals><goal>report-integration</goal></goals></execution><execution><id>default-check</id><goals><goal>check</goal></goals><configuration><rules><!-- implementation is needed only for Maven 2 --><rule implementation="org.jacoco.maven.RuleConfiguration"><element>BUNDLE</element><limits><!-- implementation is needed only for Maven 2 --><limit implementation="org.jacoco.report.check.Limit"><counter>COMPLEXITY</counter><value>COVEREDRATIO</value><minimum>0.20</minimum></limit></limits></rule></rules></configuration></execution></executions></plugin><plugin><groupId>org.eluder.coveralls</groupId><artifactId>coveralls-maven-plugin</artifactId><version>4.3.0</version></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>findbugs-maven-plugin</artifactId><version>3.0.4</version></plugin></plugins></build></project>

第三步:maven编译
mvn clean package -Dmaven.test.skip=true
这时候,再target下面已经编译好jar包了,使用命令运行即可

这个问题折磨了一下午

这篇关于RocketMQ Console安装时报Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17错误的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/648671

相关文章

一文教你如何将maven项目转成web项目

《一文教你如何将maven项目转成web项目》在软件开发过程中,有时我们需要将一个普通的Maven项目转换为Web项目,以便能够部署到Web容器中运行,本文将详细介绍如何通过简单的步骤完成这一转换过程... 目录准备工作步骤一:修改​​pom.XML​​1.1 添加​​packaging​​标签1.2 添加

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是

Linux安装MySQL的教程

《Linux安装MySQL的教程》:本文主要介绍Linux安装MySQL的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux安装mysql1.Mysql官网2.我的存放路径3.解压mysql文件到当前目录4.重命名一下5.创建mysql用户组和用户并修

Python中ModuleNotFoundError: No module named ‘timm’的错误解决

《Python中ModuleNotFoundError:Nomodulenamed‘timm’的错误解决》本文主要介绍了Python中ModuleNotFoundError:Nomodulen... 目录一、引言二、错误原因分析三、解决办法1.安装timm模块2. 检查python环境3. 解决安装路径问题

如何解决mysql出现Incorrect string value for column ‘表项‘ at row 1错误问题

《如何解决mysql出现Incorrectstringvalueforcolumn‘表项‘atrow1错误问题》:本文主要介绍如何解决mysql出现Incorrectstringv... 目录mysql出现Incorrect string value for column ‘表项‘ at row 1错误报错

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

Python解析器安装指南分享(Mac/Windows/Linux)

《Python解析器安装指南分享(Mac/Windows/Linux)》:本文主要介绍Python解析器安装指南(Mac/Windows/Linux),具有很好的参考价值,希望对大家有所帮助,如有... 目NMNkN录1js. 安装包下载1.1 python 下载官网2.核心安装方式3. MACOS 系统安

Pycharm安装报错:Cannot detect a launch configuration解决办法

《Pycharm安装报错:Cannotdetectalaunchconfiguration解决办法》本文主要介绍了Pycharm安装报错:Cannotdetectalaunchconfigur... 本文主要介绍了Pycharm安装报错:Cannot detect a launch configuratio

pytorch+torchvision+python版本对应及环境安装

《pytorch+torchvision+python版本对应及环境安装》本文主要介绍了pytorch+torchvision+python版本对应及环境安装,安装过程中需要注意Numpy版本的降级,... 目录一、版本对应二、安装命令(pip)1. 版本2. 安装全过程3. 命令相关解释参考文章一、版本对