[ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.34:validate (default) on project pig-register: Formatting violations found in the following files:
报错信息如下:
C:ShenSoftwareJDKjdk1.8.0_60binjava.exe -Dmaven.multiModuleProjectDirectory=E:CODEIntelliJIDEAPigDemopig-masterpig-master -Dmaven.home=C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven3 -Dclassworlds.conf=C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven3binm2.conf -Dmaven.ext.class.path=C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven-event-listener.jar -javaagent:C:ShenSoftwareIntelliJIDEAlibidea_rt.jar=61891:C:ShenSoftwareIntelliJIDEAbin -Dfile.encoding=UTF-8 -classpath C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven3bootplexus-classworlds-2.6.0.jar;C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven3bootplexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2021.3.2 -s C:ShenSoftwareIntelliJIDEApluginsmavenlibmaven3confsettings.xml install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pig [pom]
[INFO] pig-register [jar]
[INFO] pig-common [pom]
[INFO] pig-common-core [jar]
[INFO] pig-gateway [jar]
[INFO] pig-common-feign [jar]
[INFO] pig-common-mybatis [jar]
[INFO] pig-upms [pom]
[INFO] pig-upms-api [jar]
[INFO] pig-common-security [jar]
[INFO] pig-common-log [jar]
[INFO] pig-auth [jar]
[INFO] pig-common-swagger [jar]
[INFO] pig-upms-biz [jar]
[INFO] pig-common-bom [pom]
[INFO] pig-common-datasource [jar]
[INFO] pig-common-job [jar]
[INFO] pig-common-seata [jar]
[INFO] pig-visual [pom]
[INFO] pig-codegen [jar]
[INFO] pig-monitor [jar]
[INFO] pig-sentinel-dashboard [jar]
[INFO] pig-xxl-job-admin [jar]
[INFO]
[INFO] -------------------------< com.pig4cloud:pig >--------------------------
[INFO] Building pig 3.5.1 [1/23]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- spring-javaformat-maven-plugin:0.0.34:validate (default) @ pig ---
[INFO]
[INFO] --- git-commit-id-maven-plugin:4.9.9:revision (get-the-git-infos) @ pig ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ pig ---
[INFO] Installing E:CODEIntelliJIDEAPigDemopig-masterpig-masterpom.xml to C:Users18303.m2repositorycompig4cloudpig3.5.1pig-3.5.1.pom
[INFO]
[INFO] ---------------------< com.pig4cloud:pig-register >---------------------
[INFO] Building pig-register 3.5.1 [2/23]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- spring-javaformat-maven-plugin:0.0.34:validate (default) @ pig-register ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for pig 3.5.1:
[INFO]
[INFO] pig ................................................ SUCCESS [ 0.531 s]
[INFO] pig-register ....................................... FAILURE [ 1.125 s]
[INFO] pig-common ......................................... SKIPPED
[INFO] pig-common-core .................................... SKIPPED
[INFO] pig-gateway ........................................ SKIPPED
[INFO] pig-common-feign ................................... SKIPPED
[INFO] pig-common-mybatis ................................. SKIPPED
[INFO] pig-upms ........................................... SKIPPED
[INFO] pig-upms-api ....................................... SKIPPED
[INFO] pig-common-security ................................ SKIPPED
[INFO] pig-common-log ..................................... SKIPPED
[INFO] pig-auth ........................................... SKIPPED
[INFO] pig-common-swagger ................................. SKIPPED
[INFO] pig-upms-biz ....................................... SKIPPED
[INFO] pig-common-bom ..................................... SKIPPED
[INFO] pig-common-datasource .............................. SKIPPED
[INFO] pig-common-job ..................................... SKIPPED
[INFO] pig-common-seata ................................... SKIPPED
[INFO] pig-visual ......................................... SKIPPED
[INFO] pig-codegen ........................................ SKIPPED
[INFO] pig-monitor ........................................ SKIPPED
[INFO] pig-sentinel-dashboard ............................. SKIPPED
[INFO] pig-xxl-job-admin .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.922 s
[INFO] Finished at: 2022-07-25T14:13:35+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.34:validate (default) on project pig-register: Formatting violations found in the following files:
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconfigConfigConstants.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconfigConsoleConfig.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolecontrollerHealthController.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolecontrollerNamespaceController.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolecontrollerServerStateController.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsoleenumsNamespaceTypeEnum.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsoleexceptionConsoleExceptionHandler.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolefilterXssFilter.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolemodelNamespace.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosconsolemodelNamespaceAllInfo.java
[ERROR] * E:CODEIntelliJIDEAPigDemopig-masterpig-masterpig-registersrcmainjavacomalibabanacosPigNacosApplication.java
[ERROR]
[ERROR] Run `spring-javaformat:apply` to fix.
[ERROR] -> [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:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :pig-register
Process finished with exit code 1
执行命令:可在IDEA 中Terminal执行命令
mvn spring-javaformat:apply
备注:执行命令之前得安装 maven。
安装包:下载
环境变量配置 如图 然后点击确定就可以执行命令了(“mvn spring-javaformat:apply”)
在系统环境变量下点击path,
或者通过命令提示符执行。


![[已解决][ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.34 [已解决][ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.34](http://www.mshxw.com/aiimages/31/1027817.png)
