如何将 Maven 插件添加到 Eclipse

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11109596/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:07:40  来源:igfitidea点击:

how to add maven plugin to eclipse

eclipsemaveneclipse-pluginm2eclipse

提问by Rajeev Singh

I am new to maven. I was trying to add the maven plugin to eclipse(indigo). The problem I am facing is that when I try to add the plugin using 'Help -> Install new software' using URL http://download.eclipse.org/releases/indigothe download process starts and then stops with an error

我是 maven 的新手。我试图将 Maven 插件添加到 eclipse(indigo)。我面临的问题是,当我尝试使用 URL http://download.eclipse.org/releases/indigo使用“帮助 -> 安装新软件”添加插件时,下载过程开始然后停止并出现错误

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.emf,2.6.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.ant,2.7.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.codegen,2.6.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.codegen.ecore,2.7.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.codegen.ecore.ui,2.7.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.codegen.ui,2.6.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.common,2.7.0.v20120127-1122
No repository found containing: osgi.bundle,org.eclipse.emf.common.ui,2.7.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.converter,2.5.0.v20120130-0943
No repository found containing: osgi.bundle,org.eclipse.emf.databinding,1.2.0.v20120130-0943
...........
...........

Also when I try to install the plugin using http://download.eclipse.org/technology/m2e/releases then the installation gets stuck 48% and after a long time it again displays an error message:

此外,当我尝试使用http://download.eclipse.org/technology/m2e/releases安装插件时,安装会卡住 48%,很长时间后它再次显示错误消息:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee,   phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Multiple problems occurred while downloading.
Unable to read repository at http://download.eclipse.org/technology/m2e/releases /1.0/1.0.100.20110804-1717/plugins /org.eclipse.m2e.archetype.common_1.0.100.20110804-1717.jar.
Read timed out
Unable to read repository at http://download.eclipse.org/technology/m2e/releases /1.0/1.0.100.20110804-1717/plugins /org.eclipse.m2e.archetype.common_1.0.100.20110804-1717.jar.
Read timed out
Multiple problems occurred while downloading.
Unable to read repository at http://download.eclipse.org/technology/m2e/releases /1.0/1.0.100.20110804-1717/plugins/org.eclipse.m2e.maven.indexer_1.0.100.20110804-1717.jar.
Read timed out
Unable to read repository at http://download.eclipse.org/technology/m2e/releases  /1.0/1.0.100.20110804-1717/plugins/org.eclipse.m2e.maven.indexer_1.0.100.20110804-1717.jar.
Read timed out
............
............

Kindly suggest if there is something wrong with the installation process I am using.

请建议我使用的安装过程是否有问题。

Also suggest if there is some other method to add 'maven plugin for eclipse'.

还建议是否有其他方法可以为 Eclipse 添加“Maven 插件”。

Thanks

谢谢

回答by Kane

Check Contact all update sites during install to find required softwareoption before installing m2e.

联系安装找到所需软件中所有的更新站点安装M2E之前选项。