1. 程式人生 > >常見m2eclipse安裝錯誤及其解決方法

常見m2eclipse安裝錯誤及其解決方法

最近學習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即可,地址如下:

在沒有安裝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殺軟的檔案實時防護)。