由于 M2Eclipse 找不到连接器而无法编译
pom.xml 文件中有一个部分需要 Maven-Replacer-Plugin 和(我相信)GitDescribe。
这是它给我的错误:
生命周期配置未涵盖插件执行:com.lukegb.mojo:gitdescribe-maven-plugin:1.3:gitdescribe(执行:默认,阶段:编译)
生命周期配置未涵盖插件执行:com.google.code.maven-replacer-plugin:maven-replacer-plugin:1.3.8:replace(执行:默认,阶段:生成资源)
There is a section in the pom.xml file that requires the Maven-Replacer-Plugin and (I believe) GitDescribe.
Here are the errors it gives me:
Plugin execution not covered by lifecycle configuration: com.lukegb.mojo:gitdescribe-maven-plugin:1.3:gitdescribe (execution: default, phase: compile)
Plugin execution not covered by lifecycle configuration: com.google.code.maven-replacer-plugin:maven-replacer-plugin:1.3.8:replace (execution: default, phase: generate-resources)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
出现此消息是因为 m2e 不知道在此阶段要做什么。构建应该使用命令行 maven,但 m2e 希望您指定是否希望它运行插件。
修复取决于您想要发生的情况。您可以让 eclipse 忽略该插件或将其作为构建的一部分执行。
该文档在这里更详细地解释了它,但我复制了下面的简单答案。
https://www.eclipse.org/m2e/documentation/m2e -execution-not-covered.html
这会更改 pom 以添加一些 eclipse 元数据。如果你只是想让它构建起来,这会起作用。
您还可以在较新的 eclipse/m2e 版本中更改您的首选项。这是另一个快速修复选项。您可以在“项目属性”->“Maven”->“生命周期映射”下更改此项。
This message comes up because m2e doesn't know what to do at this phase. The build should work with command line maven, but m2e wants you to specify whether you want it to run the plugin or not.
The fix depends on what you want to happen. You can either have eclipse ignore the plugin or execute it as part of the build.
The documentation explains it in further detail here, but I'm copying the easy answer below.
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
This changes the pom to add some eclipse metadata. If you're just trying to get it to build this will work.
You can also change your preferences in newer eclipse/m2e versions. It's the other quick fix option. You can change this one under Project Properties->Maven->Lifecycle Mapping.
这个错误在他们的文档中得到了很好的描述。
此功能是在 M2Eclipse 1.0(现在的 m2e)中添加的。
它造成了很多麻烦,正如这篇博文。
一种解决方案是使用有关插件生命周期映射元数据的数据来污染 pom.xml,但这并不是很令人满意。
在 m2e 1.1 中,插件开发人员可以在其插件中嵌入一个名为 lifecycle-mapping-metadata.xml 的文件,以使其在 Eclipse 中工作(请参阅 M2E 兼容 Maven 插件)。
幸运的是,自 m2e 1.2 以来,事情已经发生了变化,我们现在可以在 Eclipse 首选项中对其进行配置(请参阅 Eclipse 工作空间生命周期映射元数据)。
This error was well described in their documentation.
This feature was added in M2Eclipse 1.0 (now m2e).
It caused much trouble, like reported in this blog post.
One solution was to pollute the pom.xml with data about the plugin lifecycle mapping metadata, but it was not very satisfying.
In m2e 1.1, plugin developers could embed a file named lifecycle-mapping-metadata.xml in their plugins to make it work in Eclipse (see M2E compatible maven plugins).
Fortunately, since m2e 1.2, things have evolved and we can now configure it in Eclipse Preferences (see Eclipse workspace lifecycle mapping metadata).