Eclipse中安装Maven

一、在Eclipse的菜单栏中选择Help,然后点击Installl New Software。。。出现如下窗口


二、单击窗口右边的Add按钮,出现如下窗口,在Name中输入m2e,Location中输入http://m2eclipse.sonatype.org/sites/m2e,单击ok按钮,Eclipse会下载m2eclipse中的资源信息


三、资源下载完之后,能看到如下图所示的界面


四、选中上图中的多选框,或在上图的界面中单击Select All按钮选中多选框,然后单击Next按钮,提示出现

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 (org.maven.ide.eclipse.feature.feature.group 0.12.1.20110112-1712)
  Missing requirement: Maven Integration for Eclipse (Editors) 0.12.1.20110112-1712 (org.maven.ide.eclipse.editor 0.12.1.20110112-1712) requires 'bundle org.eclipse.zest.core 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.eclipse.feature.feature.group 0.12.1.20110112-1712)
    To: org.maven.ide.eclipse.editor [0.12.1.20110112-1712]

于是在网上找了一下,发现是因为eclipse少了mave依赖的插件gef,于是在退回到上图的界面中,单击Add按钮,出现如下界面


在Name中输入gef,Location中输入http://download.eclipse.org/tools/gef/updates/releases,如果提示Duplicate location,是因为Eclipse中已经存在这个Location了,不需要再添加,单击Cancel按钮,然后在下图的界面中点击下拉框选择--All Available Sites--,并选中GEF SDK,然后单击Next按钮开始安装


五、安装完成之后,会提示是否需要重新起动Eclipse,选择不需要,然后重新添加m2e(第一、二、三步),m2eclipse除了核心组件之外,还提供了一额外的组件,主是要为了方便与其它组件集成(如Subversion)。组件的地址http://m2eclipse.sonatype.org/sites/m2e-extras/,安装方法跟之前的类似,添加之后,我们可以看到如下图的列表


在上图中选中多选按钮,单击Next按钮,出现如下提示

Cannot complete the install because one or more required items could not be found.
  Software being installed: Web Application Runner 0.1.0.201105060943 (com.sonatype.m2e.webby.feature.feature.group 0.1.0.201105060943)
  Missing requirement: Web Application Runner 0.1.0.201105060943 (com.sonatype.m2e.webby.feature.feature.group 0.1.0.201105060943) requires 'org.eclipse.m2e.feature.feature.group 0.0.0' but it could not be found






没有更多推荐了,返回首页