我在Mac 10.9.5上使用Eclipse Kepler.我使用m2e Eclipse插件导入了许多Maven项目.所有这些项目都是父母的孩子.当我查看各个子pom.xml文件中的"Overview"时,我看到如下内容:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:write-project-properties (execution: default, phase: process-resources)
Run Code Online (Sandbox Code Playgroud)
我希望Eclipse在适当的时候执行这些生命周期阶段,但我不知道如何做到这一点.当我选择Eclipse的建议时......
Permanently mark goal write-project-properties in pom.xml as ignore
Run Code Online (Sandbox Code Playgroud)
我在提示"选择要放置忽略的位置"时选择了父pom.xml文件,但是,当我在Eclipse编辑器中查看子pom.xml文件时,错误不会消失.如何映射m2e未涵盖的生命周期阶段?
编辑:
根据答案,我去了Eclipse - > Preferences - > Maven - > Lifecycle Mappings,点击了"Open Workspace Lifecycle Mappings Metadata",并根据建议编辑了文件......
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<versionRange>2.3.3</versionRange>
<goals>
<goal>xmlbeans</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange>[1.0-alpha-2,)</versionRange>
<goals>
<goal>write-project-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
Run Code Online (Sandbox Code Playgroud)
即使在重新启动Eclipse之后,当我打开子pom.xml文件时,"生命周期配置未涵盖的插件执行"错误仍然像以前一样.