解决Maven出现Plugin execution not covered by lifecycle configuration 错误

报错如下:  

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

解决办法:在pom.xml中在报错的plugin的外面再包上一层<pluginManagement></pluginManagement> 

<build>  

  <pluginManagement>  

     <plugins>  

         <plugin> ... </plugin>  

           <plugin> ... </plugin>                 

....          </plugins>  

    </pluginManagement>  

</build>  

猜你喜欢

转载自my.oschina.net/u/3459265/blog/1794233