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下更改此项目.

点赞