Eclipse 不能build, pom文件上面有叉叉 解决办法
来源:互联网 发布:用电脑扒图用什么软件 编辑:程序博客网 时间:2024/04/29 22:08
Error message:
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.....
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) .m2e-wtp provides a set of m2e connectors used for the configuration of Java EE projects in WTP. It features :•Support for war projects : adds the Java and Dynamic Web Facets. Support war overlays and on-the-fly resource filtering•Support for ejb projects : adds the Java and EJB Facets.•Support for ear projects : adds the EAR Facet. Supports application.xml and jboss.xml file generation, resource filtering•Support for rar projects : adds the Java and Connector Facets.•Support for app-client projects : adds the Java and Application Client Facets. Supports deployment descriptor filtering.•Support for web-fragment projects : adds the Java and Web Fragment Facets if a web-fragment.xml file is detected in the resource folders.•Support for jar dependency projects : adds the Java and Utility Facets.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 :Window > Preferences > Install / Update > Available Software SitesSince 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.
<!--My pom.xml segment-->...................<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><executions><execution><id>copy-mar-dependencies</id><phase>process-resources</phase><goals><goal>copy-dependencies</goal></goals><configuration><includeTypes>mar</includeTypes><outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/modules</outputDirectory></configuration></execution><execution><id>copy-aar-dependencies</id><phase>process-resources</phase><goals><goal>copy-dependencies</goal></goals><configuration><includeTypes>aar</includeTypes><outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/services</outputDirectory></configuration></execution></executions></plugin>......................
问题解决:
原因: 我用的两个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". 问题解决.
- Eclipse 不能build, pom文件上面有叉叉 解决办法
- eclipse中web项目中总有红叉叉显示js文件中有错误
- VMWare虚拟机启动不了有个叉叉的解决办法
- VMWare虚拟机启动不了有个叉叉的解决办法
- Eclipse中,代码没错,但有红叉叉
- 为什么电脑WiFi图标会有一把红色的叉叉在上面?
- eclipse class文件有错,左边却不显示红叉叉
- maven pom文件之 build设置
- Maven中Pom文件打包配置build
- pom文件中build标签报错
- Maven中Pom文件打包配置build
- 项目总是有红叉叉,打开又没错,Build path contains duplicate entry: '...' for project 'X
- eclipse build 不能生成apk
- Maven 本地仓库明明有jar包,但是pom文件还是报错解决办法
- Maven 本地仓库明明有jar包,但是pom文件还是报错解决办法
- Maven 本地仓库明明有jar包,pom文件还是报错解决办法
- Maven 本地仓库明明有jar包,但是pom文件还是报错解决办法
- Maven的pom.xml文件结构之Build配置build
- 片上总线Wishbone 学习(五)总线周期之复位操作
- [How-To]如何使用GNU Make 简化Google Closure Compiler的使用
- 编程:冒泡,选择,归并,快速
- Ubuntu-server 无法上网的解决办法
- [How-to]如何更加方便的在FreeBSD中使用ntfs-3g
- Eclipse 不能build, pom文件上面有叉叉 解决办法
- SqlServer位运算 权限设计
- 带环求环起开始节点位置
- iphone ios 视频拍摄旋转
- 仿iphone 气泡短信 自定义list适配器实现
- 家乡的冬天
- 专题:求解我国冷链物流
- JavaScript &JQuery 资源
- Vim 显示行号的办法