spring-petclinic-master运行mvn install报错:Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.19:validate (default) on project spring-petclinic: Formatting violations found in the following files:
如下图所示:
D:\eclipse-workspace\190603\spring-petclinic-master>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< org.springframework.samples:spring-petclinic >------------
[INFO] Building petclinic 2.2.0.BUILD-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- spring-javaformat-maven-plugin:0.0.19:validate (default) @ spring-petclinic ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.131 s
[INFO] Finished at: 2020-02-18T18:06:13+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.19:validate (default) on project spring-petclinic: Formatting violations found in the following files:
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\model\BaseEntity.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\model\NamedEntity.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\model\package-info.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\model\Person.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\Owner.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\OwnerController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\OwnerRepository.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\Pet.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\PetController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\PetRepository.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\PetType.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\PetTypeFormatter.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\PetValidator.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\owner\VisitController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\PetClinicApplication.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\system\CacheConfiguration.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\system\CrashController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\system\WelcomeController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\vet\Specialty.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\vet\Vet.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\vet\VetController.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\vet\VetRepository.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\vet\Vets.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\visit\Visit.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\main\java\org\springframework\samples\petclinic\visit\VisitRepository.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\model\ValidatorTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\owner\OwnerControllerTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\owner\PetControllerTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\owner\PetTypeFormatterTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\owner\VisitControllerTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\PetclinicIntegrationTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\service\ClinicServiceTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\service\EntityUtils.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\system\CrashControllerTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\vet\VetControllerTests.java
[ERROR] * D:\eclipse-workspace\190603\spring-petclinic-master\src\test\java\org\springframework\samples\petclinic\vet\VetTests.java
[ERROR]
[ERROR] Run `spring-javaformat:apply` to fix.
解决办法:
运行以下命令:
mvn spring-javaformat:apply