我在pluginManagement标签中的父pom.xml中有jaxws-maven-plugin,我指的是这个插件在pom中 .
mvn clean install运行正常 . 但是,eclipse抱怨“生命周期配置未涵盖插件执行:org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport(执行:FirstWsdl,阶段:生成源)” .
你能建议如何在eclipse中避免这个错误吗?
父母pom
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>FirstWsdl</id>
<goals>
<goal>wsimport</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<wsdlLocation>location/file.wsdl</wsdlLocation>
<wsdlFiles>
<wsdlFile>file.wsdl</wsdlFile>
</wsdlFiles>
<packageName>com.xxx.package</packageName>
</configuration>
</execution>
</executions>
<configuration>
<sourceDestDir>${basedir}/generated</sourceDestDir>
<verbose>true</verbose>
<extension>true</extension>
<keep>true</keep>
<vmArgs>
<vmArg .../>
</vmArgs>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
孩子pom
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
</plugin>
</plugins>
我看了这个问题并回复How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds,但是,我应该在父母和子pom中使用pluginManagement来避免这个错误吗?
4 回答
这应该是:
维基页面“M2E plugin execution not covered”中记录了
通过在父pom中添加lifecycleMappingMetadata来
.
或用
<pluginManagement>
标签封闭插件(在两个pom中) .That thread为您的特定错误消息添加了更多详细信息:
如果你找不到连接器,你可以在eclipse中关闭这个错误,因为文档说:
所以转到Eclipse:
Preferences -> Maven -> Error/Warnings
并在选项中将Error更改为Warning:Plugin execution not converted by lifecycle configuration
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html是解释所有内容的原始页面 . 在父母中定义它应该足够其子女 .
转到pom.xml并右键单击>添加依赖关系>输入组ID和工件ID单击确定 . 这将解决“生命周期未涵盖的插件执行”问题 .