Eclipse安装Maven插件

    xiaoxiao2021-03-25  125

    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 ,原文链接2

    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下面即可,这样既方便安装,如果插件冲突也方便直接移除。

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

    如图:

    转载请注明原文地址: https://ju.6miu.com/read-10279.html

    最新回复(0)