maven - 由于找不到连接器的 M2Eclipse 无法编译

标签 maven m2eclipse

pom.xml 文件中有一个部分需要 Maven-Replacer-Plugin 和(我相信)GitDescribe。

以下是它给我的错误:

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)

最佳答案

出现此消息是因为 m2e 在此阶段不知道要做什么。构建应该与命令行 maven 一起使用,但 m2e 希望您指定是否希望它运行插件。

修复取决于您想要发生的事情。您可以让 Eclipse 忽略该插件或将其作为构建的一部分执行。

文档在这里更详细地解释了它,但我正在复制下面的简单答案。
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html

这会更改 pom 以添加一些 Eclipse 元数据。如果你只是想让它来构建这将工作。

HINT: Use quick fix to create “ignore” mapping, then replace action with . M2Eclipse 1.3 and newer assume safer runOnIncremental=false by default. It is recommended to always specific desired runOnIncremental value explicitly in lifecycle mapping configuration.



您还可以在较新的 eclipse/m2e 版本中更改您的首选项。这是另一个快速修复选项。您可以在 Project Properties->Maven->Lifecycle Mapping 下更改此项。

关于maven - 由于找不到连接器的 M2Eclipse 无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8263651/

相关文章:

java - Spring + hibernate +Maven : jCannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql//localhost:3306/test'

maven - 无法使用 Maven 构建配置文件在 Jenkins 中构建

java - 如何将 Maven 与 EAR 结合使用

eclipse - 如何将 Maven 存储库 jar 添加到 Eclipse 构建路径?

eclipse - 如何解决 Spring Data Maven 构建的 "Plugin execution not covered by lifecycle configuration"

java - 使用带有testing.xml的maven命令运行多个测试

java - mvn appengine :update and mvn appengine:deploy in Google App Engine 之间的区别

maven - Gradle 发布到 Maven 添加了一个后缀,该后缀似乎不适用于 Maven POM 依赖项

android - Eclipse Indigo 无法导入在命令行上构建正常的 maven android

OSGi 和 Virgo 工具 : impossible to add a maven project (using bnd maven plugin)