Eclipse 插件错误:生命周期配置未涵盖执行

Eclipse 插件错误:生命周期配置未涵盖执行,eclipse,maven,maven-plugin,m2eclipse,m2e,Eclipse,Maven,Maven Plugin,M2eclipse,M2e,我正在尝试使用maven warpath插件。但我的pom.xml文件中不断出现一个错误,上面说: 生命周期配置未涵盖插件执行:org.appfuse.plugins:maven warpath Plugin:2.1.0:添加类(执行:默认,阶段:生成源代码) 我如何解决这个问题?以下是我的pom.xml插件代码片段: org.appfuse.plugins maven warpath插件 2.1.0 真的 添加类 Eclipse为我提供了一个quickfox提示,“发现新的m2e连接器”来

我正在尝试使用maven warpath插件。但我的pom.xml文件中不断出现一个错误,上面说:

生命周期配置未涵盖插件执行:org.appfuse.plugins:maven warpath Plugin:2.1.0:添加类(执行:默认,阶段:生成源代码)

我如何解决这个问题?以下是我的pom.xml插件代码片段:


org.appfuse.plugins
maven warpath插件
2.1.0
真的
添加类
Eclipse为我提供了一个quickfox提示,“发现新的m2e连接器”来解决这个错误。我已经安装了大多数可用的连接器,但错误仍然存在。有什么想法可以让它工作吗?

这是m2e的新版本(它取代了旧的m2eclipse插件)。要指定eclipse应该如何处理插件,您必须在项目的pom.xml中配置构建生命周期映射,或者安装连接器(决定插件是否需要在eclipse构建中执行)

由于maven warpath插件似乎没有连接器,因此您必须在pom中定义行为。您可以为此使用第二个eclipse快速修复程序(永久性地将pom.xml中的目标添加类标记为在eclipse构建中被忽略)。这将在pom中添加以下部分:

<build>
    ......
    <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.appfuse.plugins
                                    </groupId>
                                    <artifactId>
                                        maven-warpath-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.1.0,)
                                    </versionRange>
                                    <goals>
                                        <goal>add-classes</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

......
org.eclipse.m2e
生命周期映射
1.0.0
org.appfuse.plugins
maven warpath插件
[2.1.0,)
添加类
如果希望在每个eclipse构建中处理插件,可以将
操作更改为
(在
导入
清除
,…)


插件配置是特定于eclipse的,不会使pom.xml看起来更好,但至少它对Maven构建没有影响…

还可以看到答案

@FrVaBe为此做了第二次eclipse快速修复(永久性地将pom.xml中的目标添加类标记为在eclipse构建中被忽略)。会影响我的web应用程序执行吗???@Amira Manai它不应该影响执行,因为它对maven构建没有影响。就我在测试中所见,这种方法直接从maven构建中省略了maven warpath插件,不是吗?我的意思是,我希望在我的主war中收到一个
warpath
工件作为依赖项,而ch无法识别。@Xtreme Biker我不确定“省略maven warpath插件”是什么意思-插件管理部分对构建没有影响-它只是消除了eclipse错误消息。我不知道maven warpath插件是否有可用的连接器。这将使此部分变得不必要。