Error message:  

  1. execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (execution: default-jar, phase: process-classes)

多个子项目的pom.xml文件在eclipse下都有叉叉, 上面是error msg. 查阅网上资料, eclipse 读取pom.xml, 执行pom中的插件. 而m2e插件对pom中插件的不全部支持, eclipse就会提示pom.xml文件有错.

解决办法: 下载安装m2e-wtp插件, 可以在eclipse market中找到. 会解决大部分eclipse读取pom.xml的错误.

下面看看m2e-wtp插件的描述: 大概是加强eclipse中maven的支持, 依赖war/ejp/ear/rar.....

  1. Maven Integration for Eclipse WTP (a.k.a m2e-wtp) aims at providing a tight integration between Maven Integration for Eclipse (a.k.a m2e) and the Eclipse Web Tools Project (WTP) .
  2. m2e-wtp provides a set of m2e connectors used for the configuration of Java EE projects in WTP. It features :
  3. •Support for war projects : adds the Java and Dynamic Web Facets. Support war overlays and on-the-fly resource filtering
  4. •Support for ejb projects : adds the Java and EJB Facets.
  5. •Support for ear projects : adds the EAR Facet. Supports application.xml and jboss.xml file generation, resource filtering
  6. •Support for rar projects : adds the Java and Connector Facets.
  7. •Support for app-client projects : adds the Java and Application Client Facets. Supports deployment descriptor filtering.
  8. •Support for web-fragment projects : adds the Java and Web Fragment Facets if a web-fragment.xml file is detected in the resource folders.
  9. •Support for jar dependency projects : adds the Java and Utility Facets.
  10. Note that m2e-wtp requires m2e-wtp 1.0. You must make sure m2e's update site (http://download.eclipse.org/technology/m2e/releases/) is defined in :
  11. Window > Preferences > Install / Update > Available Software Sites
  12. Since m2e 1.0 is incompatible with previous versions, you may have to uninstall old m2e and m2e-wtp versions before proceeding with the installation.

再看看eclipse:

项目可以build了, delete后重新import, pom.xml和项目的叉叉都没了. 在打开pom.xml, 打开dependency hierarchy, 发现现在可以查看依赖关系了.

遗留问题1:

1. maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e.

  1. <!--My pom.xml segment-->
  2. ...................
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-dependency-plugin</artifactId>
  6. <executions>
  7. <execution>
  8. <id>copy-mar-dependencies</id>
  9. <phase>process-resources</phase>
  10. <goals>
  11. <goal>copy-dependencies</goal>
  12. </goals>
  13. <configuration>
  14. <includeTypes>mar</includeTypes>
  15. <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/modules</outputDirectory>
  16. </configuration>
  17. </execution>
  18. <execution>
  19. <id>copy-aar-dependencies</id>
  20. <phase>process-resources</phase>
  21. <goals>
  22. <goal>copy-dependencies</goal>
  23. </goals>
  24. <configuration>
  25. <includeTypes>aar</includeTypes>
  26. <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/services</outputDirectory>
  27. </configuration>
  28. </execution>
  29. </executions>
  30. </plugin>
  31. ......................

问题解决:

原因:  我用的两个eclipse,这个是由于用了M2E插件造成的,而在m2eclipse下就没有这个问题。当然,你可以用其他的打包插件,这个不是必须要用这个,所以,只是自己知道原因和解决就可以了。不一定是要换环境解决,你可以换一个plugin也可以。http://blog.csdn.net/sebatinsky/article/details/6273977

安装成功后, 有时项目会显示感叹号, 只要 update dependency, 感叹号变成叉叉,  再重新build就OK了. 项目就可以用eclipse编译, 替换jboss中class文件就可以了.

问题2: maven 提示找不到jdk.  没影响自己使用eclipse 中的maven.

warn info 贴上去, 答案遍地是. 我想说的是: 都试过, 不管用, 创建快捷方式,

添加: D:\tools\MVN+DE\eclipse\eclipse.exe  -vm "C:\Program Files\Java\jdk1.6.0_30\bin\javaw.exe". 问题解决.

转:http://blog.csdn.net/lhooouuu/article/details/6933569

Eclipse 不能build, pom文件上面有叉叉 解决办法的更多相关文章

  1. IDEA中pom文件大面积爆红的解决办法

    问题:最近发现项目的POM文件在idea中,从modelVersion开始全部变红,文件图标也不是正常的maven图标. 解决办法:点击idea的File/Invalidate Caches/Rest ...

  2. Eclipse导入Spring Boot项目后pom.xml出现红叉的解决办法

    胸怀难的问题是:程序能正常运行,但是pom.xml下面有一个红叉. 解决办法: 右键项目 --> Update project...

  3. Eclipse编辑jsp、js文件时卡死现象的解决办法汇总

    使用Eclipse编辑jsp.js文件时,经常出现卡死现象,在网上百度了N次,经过N次优化调整后,卡死现象逐步好转,具体那个方法起到作用,不太好讲.将所有用过的方法罗列如下: 1.取消验证 windo ...

  4. Mysql文件太大导入失败解决办法总结

    Mysql文件太大导入失败解决办法总结 在使用phpmyadmin导入数据库的时候可能会碰到由于数据库文件太大而无法导入的问题! 英文提示如下:File exceeds the maximum all ...

  5. Keil4 每次选build 编译(F7)都全部编译的解决办法

    Keil4 每次选build 编译(F7)都全部编译的解决办法 http://blog.csdn.net/wchengshen/article/details/50440079 Keil4 每次选bu ...

  6. 关于SSIS批量抽取Excel文件报0x80004005错误的解决办法

    原文:关于SSIS批量抽取Excel文件报0x80004005错误的解决办法 标题: Microsoft Visual Studio ------------------------------ Pa ...

  7. eclipse中运行出错:无法初始化主类的解决办法

    问题描述:eclipse中运行程序时,出现如下错误 解决办法: 出现此类:无法初始化主类有可能是因为eclipse中Java的版本与JDK的版本不匹配,我开始用的时候eclipse中用的是Java s ...

  8. win7 Host文件修改后无效的解决办法

    win7 Host文件修改后无效的解决办法 正常情况下hosts文件随时修改随时生效,如果出现修改后不生效的情况,首先确定文件是ascii编码,以windows格式为换行符,然后依次采用如下方法  1 ...

  9. django在关闭debug后,admin界面 及静态文件无法加载的解决办法

    当debug为true的时候,ALLOWED_HOSTS是跳过不管用的.所以这里需要将debug关掉,令debug=false,ALLOWED_HOSTS=[ '*' ]表示所有的主机都可以访问 开启 ...

随机推荐

  1. 【Linux】ssh建立隧道tunnel连接到内网设备

    root@192.168.1.105 建立隧道: ssh -l root -N -f -R 9103:127.0.0.1:2222 work@11.11.13.17 解析:把本地127.0.0.1:2 ...

  2. jqPlot图表插件学习之折线图-散点图-series属性

    一.准备工作 首先我们需要到官网下载所需的文件: 官网下载(笔者选择的是jquery.jqplot.1.0.8r1250.zip这个版本) 然后读者需要根据自己的情况新建一个项目并且按照如下的方式加载 ...

  3. nginx 代理静态资源报 403

    用tomcat跑了一个上传服务,文件上传到指定nginx的html目录,用nginx来代理静态资源,结果上传能够成功,访问却报403. 解决办法,将html的拥有者改成nobody: chown -R ...

  4. GitLab概念——Group、Project、Member

    概念说明: Group是一个父子结构的目录 Group每一级都可以设置关联的Member,同时每一级下都可以创建项目 Group关联的Member和Member对应的权限,会继承到Group下的所有P ...

  5. word2vec训练中文模型

    --  这篇文章是一个学习.分析的博客 --- 1.准备数据与预处理 首先需要一份比较大的中文语料数据,可以考虑中文的维基百科(也可以试试搜狗的新闻语料库).中文维基百科的打包文件地址为 https: ...

  6. 【bootstrapV3】移动端和PC端的 滚动监听

    1.本代码适用于 bootstrap V3 的 页面滚动监听 2.效果: 3.代码: <!DOCTYPE html> <html lang="zh-CN"> ...

  7. Swift3 substring几种常用用法

    举例: " let length = str.characters.count //截取前四位 )) //截取后2位(两种方法) )) )) //截取中间4位,从第2位开始(二种方法) le ...

  8. python中对两个 list 求交集,并集和差集

    python中对两个 list 求交集,并集和差集: 1.首先是较为浅白的做法: >>> a=[1,2,3,4,5,6,7,8,9,10] >>> b=[1,2,3 ...

  9. SQLDumpSplitter sql文件分割工具

    数据库误操作,只好使用使用原来的备份数据去恢复数据,但是数据量太大,只好使用SQLDumpSplitter将大文件分割成小文件,然后恢复指定的表即可.

  10. mvc 模型验证及正则表达式

    ASP.NET MVC3中的Model是自验证的,这是通过.NET4的System.ComponentModel.DataAnnotations命名空间完成的. 我们要做的只是给Model类的各属性加 ...