Eclipse安装Maven插件

1、打开eclipse,Help --  Install New Software...




2、add Repository

Name        m2e

location   http://m2eclipse.sonatype.org/sites/m2e



然后慢慢等待安装完成就可以了(大概要半个多小时)


3、验证


检查 eclipse 的 maven 插件是否安装成功Window  -->  Preferences




配置 maven:
    1. 点击 Add 按钮,选到你本机安装 maven 的路径值




    2. 点击 Browse 按钮,选到你 maven 的 setting.xml 配置文件,然后点击 OK,这样就完成了 eclipse maven 插件的配置


4、在eclipse安装maven插件时,可能会遇到的错误:

1.安装m2eclipse的时候,遇见这种错误如何解决?错误请见详细信息。

问题:Cannot complete the install because one or more required items could not be found.

Software being installed: Maven Integration for Eclipse (Required) 0.12.1.20110112-1712 (or
g.maven.ide.eclipse.feature.feature.group 0.12.1.20110112-1712)

Missing requirement: Maven Project Model Edit Bundle 0.12.1.20110112-1712 (org.maven.id
e.eclipse.maven_model_edit 0.12.1.20110112-1712) requires 'bundle org.eclipse.emf.ecore 0.
0.0' but it could not be found

Cannot satisfy dependency:

From: Maven Integration for Eclipse (Required) 0.12.1.20110112-1712 (org.maven.ide.eclip
se.feature.feature.group 0.12.1.20110112-1712)

To: org.maven.ide.eclipse.maven_model_edit [0.12.1.20110112-1712] 他说有个文件找不到
。但是到Maven的m2e的链接中,相关文件又是存在的。试了很多次了。都有这个问题。

解决:先连接Helios Update site (Helios - http://download.eclipse.org/releases/helios),安装
插件Graphical Editing Framework Zest Visualization Toolkit SDK。然后再安装 M2Eclipse plug-ins 。

 
 
2:如果装的插件版本太高会报

  
  
Cannot complete the install because one or more required items could not be
 found.
   Software being installed: m2e - Maven Integration for Eclipse (includes I

ncubating components) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature.

group 1.5.0.20140606-0033)
   Missing requirement: Maven Integration for Eclipse 1.5.0.20140606-0033 (o

rg.eclipse.m2e.core 1.5.0.20140606-0033) requires 'bundle com.google.guava

 [14.0.1,16.0.0)' but it could not be found

   Cannot satisfy dependency:

     From: Maven Integration for Eclipse 1.5.0.20140606-0033 (org.eclipse.m2

e.core.ui 1.5.0.20140606-0033)

     To: bundle org.eclipse.m2e.core [1.5.0,1.6.0)

   Cannot satisfy dependency:

     From: m2e - Maven Integration for Eclipse (includes Incubating componen

ts) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature.group 1.5.0.201406

06-0033)

答案:这种情况换一个低版本的安装,如

http://download.eclipse.org/technology/m2e/milestones/1.4



5、以下为补充内容:

由于Maven项目地址经常变动,以上maven插件连接可能失效,可以采用最直接的办法,直接网上下载maven插件,然后解压放在Eclipse的dropins下面即可,这样既方便安装,如果插件冲突也方便直接移除。

此种方式为目前最佳安装方式。

如图:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值