欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

常见m2eclipse安装错误及其解决方法

程序员文章站 2022-07-14 11:30:09
...

源:

评:

最近学习maven,发现一些安装问题,从网上找了一些解决方法

---------------------------------------------------------------------------------
错误一:eclipse 3.6.1 安装maven插件失败 解决方法:
---------------------------------------------------------------------------------

m2eclipse-core Update Site: http://m2eclipse.sonatype.org/sites/m2e
m2eclipse-extras Update Site: http://m2eclipse.sonatype.org/sites/m2e-extras
注意 :必须两个插件都安装,不安装extras 插件时,点击“run as server”来运行项目时会报错:“the selected did not contain any resources that can run on server maven project” 

实际测试发现eclipse 3.6.1已经安装gef,仅仅缺少zest插件,最小安装zest的runtime即可,地址如下:

 

http://www.eclipse.org/downloads/download.php?file=/tools/gef/downloads/drops/3.6.1/R201009132020/GEF-zest-3.6.1.zip

在没有安装zest插件的话,直接安装m2eclipse插件会报出缺少依赖的错误,信息如下:

Cannot complete the install because one or more required items could not be found.
Software being installed: Maven Integration for Eclipse (Required) 0.10.0.20100209-0800 (org.maven.ide.eclipse.feature.feature.group 0.10.0.20100209-0800)
Missing requirement: Maven Integration for Eclipse (Editors) 0.10.0.20100209-0800 (org.maven.ide.eclipse.editor 0.10.0.20100209-0800) 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.10.0.20100209-0800 (org.maven.ide.eclipse.feature.feature.group 0.10.0.20100209-0800)
To: org.maven.ide.eclipse.editor [0.10.0.20100209-0800]

 

---------------------------------------------------------------------------------
错误二:maven Integration for eclipse jdk warning 解决方法:
---------------------------------------------------------------------------------
在eclipse.ini中,添加你的-vm选项,指向jdk的安装路径。
如(eclipse.ini):
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-vm
D:/Program Files/Java/jdk1.6.0_10/bin/javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
---------------------------------------------------------------------------------
错误三:找不到settings.xml

---------------------------------------------------------------------------------
在安装m2eclipse 0.10.0时,由于它自带的是Maven 3。 所以会出现未设置settings.xml的错误。 可以更改为自己下载的maven 2.2.1。
---------------------------------------------------------------------------------
错误四:Unable to locate the Javac Compiler in:..........................\lib\tools.jar
---------------------------------------------------------------------------------
在eclipse下,window---->perference-->java---->install jres的jre中,添加tools.jar。
---------------------------------------------------------------------------------
错误四:启动问题,老是启不了。
---------------------------------------------------------------------------------

启动不了,界面老是阻塞。可能与杀毒软件有关(如360杀软的文件实时防护)。