eclipse中pom文件报错:plugin execution not covered by lifecycle configuration

Overview显示错误:

pom.xml显示错误:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-help-plugin:2.2:effective-pom (execution: generate-
     effective-dependencies-pom, phase: generate-resources)
    - maven-remote-resources-plugin (goal "process") is ignored by m2e.

其实eclipse提供了解决方法:

在Overview界面点击红色字体,第一种方法是修改pom.xml配置文件,第二种方法是修改lifecycle-mapping-metadata.xml文件

原因:

基于maven的项目,使用各种maven plugin来完成开发中的各种工作,例如编译代码,打包,部署等等…

每个plugin包含许多的goal,用来做特定的事情。典型的基于java的maven项目就有 clean compile test package

deploy等goal要执行。除了这些比较常见的goal之外,项目中还可以使用大量的第三方的plugin,甚至自己动手开发的plugin。

扫描二维码关注公众号,回复: 5564569 查看本文章

随之而来的问题是,在eclipse中编辑maven项目的时候,eclipse并不知道这些goal要做什么,通用的goal还好说,特殊用途的goal就没有办法了。所以m2eclipse这个集成maven到eclipse的plugin就提供了开发extra的能力,eclipse利用这些extra来完成本来在maven plugin要干的活。

参考资料:

https://blog.csdn.net/xyr05288/article/details/79569183

猜你喜欢

转载自blog.csdn.net/csj50/article/details/84957054
今日推荐