Errors of maven-checkstyle-plugin Reported When Compiling Spring Boot
Symptom
During the Spring Boot compilation, the following message is displayed because maven-checkstyle-plugin is checked:
[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]

Key Process and Cause Analysis
According to the test result, the check for maven-checkstyle-plugin fails in the x86 environment. Committing code is not involved in this case. Therefore, you are advised to remove the plugin.
Conclusion and Solution
Comment out the specified code of maven-checkstyle-plugin.
- Open the pom.xml file.
vim pom.xml
- Press i to enter the insert mode and use <!-- and --> to comment out the first plugin where maven-checkstyle-plugin is located.
Add the following content below line 31:
<!--
Add the following content below line 89:
-->

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Run the compile command again.
mvn clean install -Dgpg.skip=true
Parent topic: Troubleshooting