问题提出:
在使用Maven过程中,碰到了如下问题:
Plugin execution not covered by lifecycle configuration: io.spring.javaformat:spring-javaformat-maven-plugin:0.0.4:validate
(execution: default, phase: validate)
错误信息截图如下:
项目中使用的pom.xml的片段如下:
<build>
<plugins>
......
<plugin>
<groupId>io.spring.javaformat</groupId>
<artifactId>spring-javaformat-maven-plugin</artifactId>
<version>${spring-javaformat.version}</version>
<executions>
<execution>
<phase>validate</phase>
<inherited>true</inherited>
<configuration>
<skip>${disable.checks}</skip>
</configuration>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
.....
</build>
问题的解决:
经过一番网络上的查找之后,问题的定位为缺失造成的。 可以按照如下来修改:
<build>
<pluginManagement>
<plugins>
<plugin> ... </plugin>
<plugin> ... </plugin>
....
</plugins>
</pluginManagement>
</build>
然后重新clean项目,编译之后,问题随即消失。