Solve the Plugin execution not covered by lifecycle configuration error in Maven

The error is as follows:  

  1. Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)  

Solution: wrap another layer of <pluginManagement></pluginManagement> outside the plugin that reported the error in pom.xml 

<build>  

  <pluginManagement>  

     <plugins>  

         <plugin> ... </plugin>  

           <plugin> ... </plugin>                 

....          </plugins>  

    </pluginManagement>  

</build>  

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324426133&siteId=291194637