Maven 项目转 Eclipse
来源:互联网 发布:excel导入mysql 编辑:程序博客网 时间:2024/05/01 09:08
用maven命令创建项目后,使用mvn eclipse:eclipse转为Eclipse项目后,项目不会由Eclipse中的m2e管理,添加依赖将会失效,此处修改.project和.classpath文件以解决问题。
If you have a Maven based Eclipse project that you generated using mvn eclipse:eclipse, you’ll notice you won’t be able to use M2Eclipse (m2e) with it. If you look at the Eclipse .project file, you’ll see this comment.
NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
Here’s how you can convert your Maven Eclipse Plugin project to m2e. First add the M2Eclipse builder under the buildSpec tag, and the M2Eclipse nature under the natures tag, both inside the .project file.
...<buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name></buildCommand>
<div class="line number1 index0 alt2"><code class="xml plain">...</code></div><div class="line number2 index1 alt1"><code class="xml plain"><</code><code class="xml keyword">nature</code><code class="xml plain">>org.eclipse.m2e.core.maven2Nature</</code><code class="xml keyword">nature</code><code class="xml plain">></code></div>
Next step is to replace all the M2_REPO libraries in the .classpath file with the M2Eclipse classpath container.
<classpathentrykind="con"path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
Refresh your Eclipse project. Right click on the project in Project Explorer View and you should now see the Maven option.
- See more at: http://blog.teamextension.com/m2eclipse-m2e-support-for-maven-eclipse-plugin-projects-497- maven 项目转 eclipse
- Maven 项目转 Eclipse
- maven 项目转 eclipse
- eclipse项目转maven项目
- 使用 Maven管理Eclipse Java项目(转)
- 使用 Maven管理Eclipse Java项目(转)
- 转eclipse maven web 项目建立过程
- eclipse 中创建maven web项目 <转>
- Eclipse maven构建springmvc项目(转)
- (转)eclipse 中创建maven web项目
- 使用Eclipse构建Maven项目(转)
- Eclipse+Maven创建webapp项目(转)
- maven管理eclipse项目
- Maven 项目eclipse调试
- eclipse 配置maven 项目
- eclipse 构建maven 项目
- Eclipse构建Maven项目
- Maven项目导入Eclipse
- 算法谜题(一)——答案
- 如何阻止搜索引擎收录指定网页
- 杭电2070用这个__int64定义,
- 关于存储用户密码的思考,bcrypt 和 PBKDF2算法
- 证明函数极限的唯一性(百度知道)
- Maven 项目转 Eclipse
- day2-3
- 2070 Fibbonacci Number
- linux中gcc工具使用笔记
- HDOJ题目2045 不容易系列之(3)—— LELE的RPG难题 (递推)
- http 返回值
- Android研究之游戏开发碰撞检测
- java代码编写基本规范
- JS 正则验证表单