安装eclipse maven插件m2eclipse No repository found containing

m2eclipse插件是Eclipse的一款Maven插件。

安装m2eclipse插件的步骤例如以下:

启动Eclipse,在菜单条中选择Help,然后选择Install New Software…,能够看到一个Install对话框,点击Work with:字段边上的Addbutton,会得到一个新的Add Repository对话框,在Name字段中输入m2eLocation字段中输入http://download.eclipse.org/technology/m2e/releases。然后点击OK

显示了m2eclipse的核心模块Maven Integration for Eclipse (Required),选择“Maven Integration for Eclipse”后点击NextEclipse会自己主动计算模块间的依赖关系,然后给出一个将被安装的模块列表;确认无误后,继续点击Next;看到许可证信息,m2eclipse使用的开源许可证是Eclipse Public License v1.0。选择I accept the terms of the license agreements,然后点击FinishEclipse開始下载安装选择的模块。



错误解决的方法:

可能会突然弹出一个类似“No repository found containing”的错误提示信息:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,com.android.ide.eclipse.traceview,20.0.3.v201208082019-427395
No repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.traceview,20.0.3.v201208082019-427395


又一次回到第一步,点击“Available Software Sites”(Work with以下),就会弹出一个配置网站信息列表,选中“m2e”,再点击“Export”导出,保存为“bookmarks.xml”。回到配置网站信息列表,选中“m2e”,点击“Remove”移除,然后打开“bookmarks.xml”文件。在eclipse后面加入一个“/”。保存。又回到配置网站信息列表,点击“Import”把“bookmarks.xml”文件导入。再回到步骤2就可以。


改动前

<?xml version="1.0" encoding="UTF-8"?

>
<bookmarks>
   <site url=http://download.eclipse.org/technology/m2e/releases selected="true" name="m2e"/>
</bookmarks>


改动后

<?xml version="1.0" encoding="UTF-8"?>
<bookmarks>
   <site url="http://download.eclipse.org/technology/m2e/releases/" selected="true" name="m2e"/>
</bookmarks>

原文地址:https://www.cnblogs.com/jzssuanfa/p/6889096.html