解决'maven lifecycle mapping not converted'的问题
基于maven的项目,使用各种maven plugin来完成开发中的各种工作,例如编译代码,打包,部署等等… 每个plugin包含许多的goal,用来做特定的事情。典型的基于java的maven项目就有 clean compile test package deploy等goal要执行。除了这些比较常见的goal之外,项目中还可以使用大量的第三方的plugin,甚至自己动手开发的plugin。
随之而来的问题是,在eclipse中编辑maven项目的时候,eclipse并不知道这些goal要做什么,通用的goal还好说,特殊用途的goal就没有办法了。所以m2eclipse这个集成maven到eclipse的plugin就提供了开发extra的能力,eclipse利用这些extra来完成本来在maven plugin要干的活。
如果eclipse没有办法知道某个goal要干什么,那么通常就会看到如下的错误信息:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.6:copy (execution: default, phase: validate)
参考这里http://wiki.eclipse.org/M2E_plugin_execution_not_covered 之后,要做的就是告诉eclipse要忽略的goal,我认为在workspace的层面忽略比较合适,这个本身就是编辑器层次的问题,和项目无关,所以如果放在pom中感觉怪怪的。由于我个人更倾向于在命令行下让maven干活,而eclipse更多的只是充当编辑器的角色,所以我要的只是让eclipse忽略掉这些goal就好了。
首先安装最新版本的m2eclipse (1.2 ver),update side是 http://download.eclipse.org/technology/m2e/releases 因为m2eclipse已经交给eclipse来维护了,所以之前的那个(http://download.eclipse.org/technology/m2e/releases),已经不更新了。
安装完之后,我们来忽略上面的那个错误,它的意思是eclipse不知道 maven-dependency-plugin 里面的 goal:copy 我没有办法执行 :) 要忽略这个goal,打开 eclipse->preference->maven->lifecycle mappings,打开 lifecycle-mapping-metadata.xml 文件,将如下内容替换进去:
lifecycle-mapping-metadata.xml
<?xml version="1.0" encoding="UTF-8" ?> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.6, )</versionRange>
<goals>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution> </pluginExecutions> </lifecycleMappingMetadata>
然后执行一下Project Update,那个错误就消失了
http://ljhzzyx.blog.163.com/blog/static/383803122013440345857/
解决'maven lifecycle mapping not converted'的问题的更多相关文章
- Maven教程(3)--Maven导入工程常见问题(编码、MavenArchiver、Lifecycle Mapping、maven install 没有反应)
常见错误: 常见错误一:These projects must be migrated to correctly function in this version of MyEclipse 需要修改编 ...
- 16)maven lifecycle
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html http://maven.apache.o ...
- Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins问题的解决
今天换了个maven仓库,结果新建maven工程的时候,忽然报错: Cannot read lifecycle mapping metadata for artifact org.apache.mav ...
- 【待解决】maven创建web报Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins
Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-war-plugin:maven- ...
- win10 pro eclipse maven: Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav invalid END header (bad central directory offset)
Error:Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav ... invalid E ...
- [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"
[转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...
- maven创建web报错Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-compiler-plugin:maven-compiler-plugin:3.5.1:runtime Cause: error in opening zip file
Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-compiler-plugin:m ...
- Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav问题
1.导致问题原因:从装系统,从win7改到win10 由于重装了系统,打开eclipse时,maven验证会出错,点击pom文件,会发现有红色的Cannot read lifecycle mappin ...
- 解决Maven出现Plugin execution not covered by lifecycle configuration 错误
http://blog.163.com/xh_ding/blog/static/1939032892015222368827/ 解决Maven出现Plugin execution not covere ...
随机推荐
- asp.net 自定义特性
今天看张子阳的.net中的反射(反射特性)一文,觉得反射配合自定义的特性确实还挺有用,之前看书.看博客之后好多心血来潮敲的代码随便往桌面上一放,时间一久,连自己也分不清它们是干嘛的了,然后就是删除,虽 ...
- nodejs npm vue yarn 环境搭建
1.nodejs中文网http://nodejs.cn/download/下载最新版本 2.安装注意,虽然.msi包没有右键用管理员权限运行,如果直接双击安装可能会存在安装失败的问题.使用管理员权限运 ...
- CSS怎么隐藏滚动条(三种方法)
xhtml中隐藏滚动条在用ie6浏览有框架的xhtml页面的时候,默认会水平和垂直滚动条会一起出现,这是ie6的一个bug,在firefox上是正常的,出现的原因是其对XHTML 1.0 transi ...
- java 之 集合概述
一.集合概述 不管是哪一种数据结构,其实本质上都是容器来着,就是用来装对象的.因此,我们就要搞清楚两点:(1)如何存储(2)存储特点 1.集合 集合是 Java 中提供的一种容器,可以用来存储多个数据 ...
- swift - 开心一刻
let array = ["one", "two", "three", "four", "five" ...
- 从CMS到G1:LinkedIn个人主页调优实战
本文转载自公众号:阿飞的博客,阅读大约需要13分钟.阿飞是我认识几年的好友,对技术有很强的专研精神,跟他讨论GC问题的时候一些观点都很深刻. LinkedIn中的个人主页是访问量最多的页面之一,它允许 ...
- WebApplicationContext初始化的两种方式和获取的三种方式
原博客地址:http://blog.csdn.net/lmb55/article/details/50510547 接下来以ContextLoaderListener为例,分析它到底做了什么? app ...
- Django之 RESTful规范
RESTful 规范 一.什么是RESTful REST与技术无关,代表的是一种软件架构风格,REST是Representational State Transfer的简称,中文翻译为"表征 ...
- MapReduce工程(IDEA)
MapReduce工程(IDEA) hadoop 1. maven工程 1.1 创建maven工程 1.2 修改配置文件 1.3 Mapper类 1.4 Reduces类 1.5 Driver类 1. ...
- List 分隔多次执行 且在同一个事物当中
@Override public boolean insrtListDatas(List<EtlCheckrecord> listmap, int fen) { if(fen<=0) ...