一、卸载原有maven插件
MyEclipse 6.5集成了Maven插件,不过有不少bug,用习惯了m2eclipse,不想在这上面浪费时间。要安装m2eclipse,需要先把自带的maven插件卸载掉,卸载步骤如下:
1.删除/eclipse/features/com.genuitec.myeclipse.maven_6.5.1.zmyeclipse650200806目录
2.进入plugins目录,删除以下目录及jar包
?2?org.maven.ide.components.archetype_common_2.0.0.20080331-1600
?3?org.maven.ide.components.maven_embedder_2.1.0.20080410-2200
?4?org.maven.ide.components.maven_model_edit_1.0.0.20080331-1600
?5?org.maven.ide.components.maven_scm_1.0.0.20080410-2200
?6?org.maven.ide.components.nexus_indexer_1.0.0.20080331-1600
?7?org.maven.ide.components.qname_1.0.0.20080331-1600
?8?com.genuitec.eclipse.maven_6.5.1.zmyeclipse650200806.jar
?9?org.maven.ide.eclipse.central_0.9.1.zmyeclipse650200806.jar?
10?org.maven.ide.eclipse.scm_0.9.2.zmyeclipse650200806.jar
11?org.maven.ide.eclipse_0.9.3.zmyeclipse650200806.jar
?
二、在线安装m2eclipse
1.Help -> Find and Install ->Search for new features to install->New Remote Site
2?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/
帖子内容
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/.
所以上面的地址变成了这样
2?url:http://repository.sonatype.org/content/sites/forge-sites/m2e/0.10.0/S/20100209-0800/
再安装就没有问题了。
3.设置maven
?
三、问题
重启MyEclipse后,跳出异常
2?Some?Maven?plugins?may?not?work?when?importing?projects?or?updating?source?folders.
具体的解决方案见这个链接http://www.blogjava.net/itvincent/archive/2010/07/25/327101.html