---
title: 编译Spring Boot时提示maven-checkstyle-plugin有问题的解决方法
description: 编译Spring Boot过程中由于检查maven-checkstyle-plugin，提示如下信息：
url: "https://www.hikunpeng.com/document/detail/zh/kunpengwebs/ecosystemEnable/SpringBoot/kunpengspringboot_02_0017.html"
---

# 编译Spring Boot时提示maven-checkstyle-plugin有问题的解决方法

#### 问题现象描述

编译Spring Boot过程中由于检查maven-checkstyle-plugin，提示如下信息：

```
[ERROR] Failed to execute goal org.apache.maven.plugins:
maven-checkstyle-plugin
:3.0.0:check(checkstyle-validation) on project spring-cloud-gateway-core: Failed duringcheckstyle execution: There are 47 errors reported by Checkstyle 8.18 withcheckstyle.xml ruleset. -> [Help 1]
```


#### 关键过程、根本原因分析

经过测试，发现在x86架构的环境中，maven-checkstyle-plugin插件的检查会失败。由于本案例不涉及代码提交，建议去掉该插件以避免出现问题。


#### 结论、解决方案及效果

将maven-checkstyle-plugin插件部分的代码注释掉。

1. 打开pom.xml文件。

```
vim pom.xml
```


2. 按“i”进入编辑模式，用<!--和-->注释掉maven-checkstyle-plugin所在第一个plugin。
  在第31行的下一行插入如下信息。

```
<!--
```


  在第89行的下一行插入如下信息。

```
-->
```


3. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
4. 重新执行编译命令。

```
mvn clean install -Dgpg.skip=true
```
