插件错误:生命周期配置未涵盖执行
我正在尝试使用 maven-warpath-plugin 此处提供。但我的 pom.xml 文件中不断出现错误,内容如下:
生命周期配置未涵盖插件执行:org.appfuse.plugins:maven-warpath-plugin:2.1.0:add-classes(执行:默认,阶段:生成源)
如何解决此问题?这是我的插件的 pom.xml 片段:
<plugin>
<groupId>org.appfuse.plugins</groupId>
<artifactId>maven-warpath-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>add-classes</goal>
</goals>
</execution>
</executions>
</plugin>
Eclipse 为我提供了一个快速提示“发现新的 m2e 连接器”来解决此错误。我已经安装了大多数似乎适用的可用连接器,但错误仍然存在。我有什么想法可以让这项工作成功吗?
I am trying to use the maven-warpath-plugin available here. But I keep getting an error in my pom.xml file that says:
Plugin execution not covered by lifecycle configuration: org.appfuse.plugins:maven-warpath-plugin:2.1.0:add-classes (execution: default, phase: generate-sources)
How do I resolve this? Here is my pom.xml snippet for the plugin:
<plugin>
<groupId>org.appfuse.plugins</groupId>
<artifactId>maven-warpath-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>add-classes</goal>
</goals>
</execution>
</executions>
</plugin>
Eclipse offers me a quickfox tip to "discover new m2e connectors" to resolve this error. I have installed most of the connectors available that seem to apply but the error is still there. Any ideas how I could make this work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是 m2e 的新行为(取代了旧的 m2eclipse 插件)。要指定 eclipse 应该对插件执行什么操作,您必须在项目的 pom.xml 中配置构建生命周期映射 - 或者安装连接器(它决定插件是否需要在 eclipse 构建中执行)(如果存在)。
由于 maven-warpath-plugin 似乎没有连接器,因此您必须在 pom.xml 中定义行为。您可以使用第二个 Eclipse 快速修复程序(永久地将 pom.xml 中的目标添加类标记为在 Eclipse 构建中忽略)。这会将以下部分添加到您的 pom 中:
如果您想在每个 eclipse 构建中处理插件,则可以将
操作更改为
(在导入
、清理
、...)。插件配置是 eclipse 特定的,不会使 pom.xml 看起来更好 - 但至少它对 Maven 构建没有影响......
This is the new behaviour of m2e (which replaced the old m2eclipse plugin). To specify what eclipse should do with the plugin you have to configure the build lifecycle mapping in the project's pom.xml - or install a connector (which decides if the plugin needs to be executed in an eclipse build or not) if it exists.
As there seems to be no connector for the maven-warpath-plugin yet you have to define the behaviour in the pom. You can use the second eclipse quickfix for this (Permamnently mark goal add-classes in pom.xml as ignored in eclipse build). This will add the following section to your pom:
You can change the
<ignore>
action to<execute>
if you want to process the plugin in each eclipse build (onimport
,clean
, ...).The plugin configuration is eclipse specific and does not make the pom.xml look nicer - but at least it has no influence on the Maven build....
另请参阅答案如何解决“ Spring Data Maven 构建的生命周期配置未涵盖插件执行
Also see the answer How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds
错误pom.xml:生命周期配置未涵盖插件执行:org.bsc.maven:maven-processor-plugin:3.3.3:process
我的项目是ProjectA,它是由maven版本3.3.3创建的,我使用eclipse版本4.5。但是当安装 eclipse 版本 2021 - 4.20 时,然后我在 eclipse (版本 4.20)上打开projectA,pom.xml 中出现错误:错误详细信息:生命周期配置未涵盖插件执行:org.bsc.maven:maven-processor-plugin:3.3 .3:process(execution: process,phase: process-resources)
我不知道为什么会出现在eclipse的新版本4.20上。出现“执行”错误,
非常感谢您的帮助!
Error pom.xml: Plugin execution not covered by lifecycle configuration: org.bsc.maven:maven-processor-plugin:3.3.3:process
my project is ProjectA, it's created by maven version 3.3.3 and i used eclipse version 4.5. But when install eclipse version 2021 - 4.20, then I open projectA on eclipse (version 4.20) errors appear in pom.xml: error detail: Plugin execution not covered by lifecycle configuration: org.bsc.maven:maven-processor-plugin:3.3.3:process (execution: process, phase: process-resources)
I don't know why appears on eclipse's new version 4.20. Error appear "execution"
Thank you very much for help!