gpt4 book ai didi

eclipse - m2e生命周期映射: delegating plugin execution

转载 作者:行者123 更新时间:2023-12-02 16:19:01 25 4
gpt4 key购买 nike

根据m2e wiki :

m2e matches plugin executions to actions using combination of plugin groupId, artifactId, version range and goal. There are three basic actions that m2e can be instructed to do with a plugin execution -- ignore, execute and delegate to a project configurator.

此外,我可以阅读该内容来忽略我需要执行的插件:

<pluginExecution>
<pluginExecutionFilter>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<versionRange>[2.0.5,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<delegate />
</action>
</pluginExecution>

因此,委托(delegate)执行似乎是合乎逻辑的,我应该做同样的事情,但是:

<action>
<delegate />
</action>

但是这不起作用。我收到以下错误:

没有枚举常量 org.eclipse.m2e.core.lifecyclemapping.model.PluginExecutionAction.delegate

那么委托(delegate)插件执行的方法是什么?我是否应该省略我想要委托(delegate)的插件的 pluginExecution 元素?

最佳答案

关于M2E compatible maven plugins 。只有

1. <ignore/> mapping 
2. <execute/> mapping

没有提到委托(delegate)标签。

如果我理解正确的话,这是默认配置,没有任何必需的配置。这只是让 Eclipse M2E/M2E 扩展来决定。请注意,对于我来说,我使用 JBoss 的“用于 Eclipse WTP 的 m2e 项目配置器”来处理 Web 项目。您可能需要使用一些符合您要求的 M2E 扩展。

我总是使用忽略来管理自定义资源并且它工作正常。

更新:

在 Eclipse 中,请单击菜单Windows ---> 首选项 --> Maven ---> Discovery。然后单击“打开目录”按钮。系统将为您提供用于安装的扩展(m2e 连接器)列表。例如,有Android连接器、antlr、AspectJ等等。我希望有一个扩展可以帮助您实现要求。

关于eclipse - m2e生命周期映射: delegating plugin execution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10813300/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com