Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-source (execution: add-functional-so
程序员文章站
2022-09-27 22:57:07
在maven项目中使用add-source时,pom.xml报如下错误: 出错误代码处(红色标记) 将上述代码注释后,加入的代码如下: 然后maven -> Update Project 即可 转载来源:https://www.cnblogs.com/guyezhai/p/5629822.html ......
在maven项目中使用add-source时,pom.xml报如下错误:
plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-source (execution: add-functional-source, phase: generate-sources)
出错误代码处(红色标记)
<!-- 增加functional test的source目录 --> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>build-helper-maven-plugin</artifactid> <executions> <execution> <id>add-functional-source</id> <phase>generate-sources</phase> <goals> <goal>add-test-source</goal> </goals> <configuration> <sources> <source>src/test/functional</source> </sources> </configuration </execution> </executions> </plugin>
将上述代码注释后,加入的代码如下:
<pluginmanagement> <plugins> <!--this plugin's configuration is used to store eclipse m2e settings only. it has no influence on the maven build itself.--> <plugin> <groupid>org.eclipse.m2e</groupid> <artifactid>lifecycle-mapping</artifactid> <version>1.0.0</version> <configuration> <lifecyclemappingmetadata> <pluginexecutions> <pluginexecution> <pluginexecutionfilter> <groupid> org.codehaus.mojo </groupid> <artifactid> build-helper-maven-plugin </artifactid> <versionrange> [1.8,) </versionrange> <goals> <goal>add-source</goal> </goals> </pluginexecutionfilter> <action> <ignore></ignore> </action> </pluginexecution> </pluginexecutions> </lifecyclemappingmetadata> </configuration> </plugin> </plugins> </pluginmanagement>
然后maven -> update project 即可
转载来源:
上一篇: 课时6.HTTP协议(理解)
推荐阅读
-
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-source (execution: add-functional-so
-
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-test-source (execution: add-functional-so