MyEclipse 6.5集成了Maven插件,不过有不少bug,用习惯了m2eclipse,不想在这上面浪费时间。要安装m2eclipse,需要先把自带的maven插件卸载掉,卸载步骤如下:
1.删除/eclipse/features/com.genuitec.myeclipse.maven_6.5.1.zmyeclipse650200806目录
2.进入plugins目录,删除以下目录及jar包
com.genuitec.myeclipse.maven_6.5.1.zmyeclipse650200806 org.maven.ide.components.archetype_common_2.0.0.20080331-1600 org.maven.ide.components.maven_embedder_2.1.0.20080410-2200 org.maven.ide.components.maven_model_edit_1.0.0.20080331-1600 org.maven.ide.components.maven_scm_1.0.0.20080410-2200 org.maven.ide.components.nexus_indexer_1.0.0.20080331-1600 org.maven.ide.components.qname_1.0.0.20080331-1600 com.genuitec.eclipse.maven_6.5.1.zmyeclipse650200806.jar org.maven.ide.eclipse.central_0.9.1.zmyeclipse650200806.jar org.maven.ide.eclipse.scm_0.9.2.zmyeclipse650200806.jar org.maven.ide.eclipse_0.9.3.zmyeclipse650200806.jar
二、在线安装m2eclipse
1.Help -> Find and Install ->Search for new features to install->New Remote Site name:m2eclipse url:http://m2eclipse.sonatype.org/sites/m2e/0.10.0.20100209-0800/
2.点击Finish,开始自动搜索。这个链接之前是好用的,不过今天再下载总是提示错误,直接访问也提示内容找不到,看来是挪地方了。最后在官网找到这个帖子Where did http://m2eclipse.sonatype.org/sites/m2e go?根据提示找到了最新地址http://repository.sonatype.org/content/sites/forge-sites/m2e/
帖子内容
As of June 2013, that site has been shut down because M2Eclipse was moved to the Eclipse Foundation years ago. You can access the archived M2Eclipse sites (including 0.12) here: https://repository.sonatype.org/content/sites/forge-sites/m2e/ For more information on how to access current m2e releases, see http://eclipse.org/m2e/download/.
所以上面的地址变成了这样
name:m2eclipse url:http://repository.sonatype.org/content/sites/forgesites/m2e/0.10.0/S/20100209-0800/
再安装就没有问题了。
3.设置maven
Window->preferences,搜索maven,User Settings中选择本地maven配置文件,Update Settings->Apply->OK
三、问题
重启MyEclipse后,跳出异常
Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing projects or updating source folders.
具体的解决方案见这个链接http://www.blogjava.net/itvincent/archive/2010/07/25/327101.html