使用 Eclipse 安装 Maven 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7385057/
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 20:30:45  来源:igfitidea点击:

Maven plugin install with Eclipse

eclipsepluginsmaven

提问by Swagatika

I am new to Maven, I have to install maven plugin in eclipse. I am facing some issues in the same, as the inputs I am getting different sites are not working. I have also gone through existing posts like this, which talks about running the command like :

我是 Maven 新手,我必须在 Eclipse 中安装 Maven 插件。我面临着同样的一些问题,因为我在不同网站上的输入不起作用。我也通过像现有员额了这个,其中谈到像运行以下命令:

mvn install:install-file -Dfile=c:\kaptcha-2.3.jar -DgroupId=com.google.code 
-DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar

but where do I run this command ??

但是我在哪里运行这个命令??

This sitetalks about adding as parameter maven.repo.remotelike :

这个站点谈论添加参数maven.repo.remote像:

maven -DartifactId=maven-eclipse-plugin-plugin -DgroupId=mevenide -Dversion=0.3.1 plugin:download

BUt where are these parameter set ??

但是这些参数在哪里设置??

Please can someone help me with pointing some good resource, which gives easy steps to install maven plugin in eclipse?

请有人帮我指出一些好的资源,它提供了在eclipse中安装maven插件的简单步骤吗?

My eclipse version: indigo release, Java EE IDE.

我的 eclipse 版本:indigo 版本,Java EE IDE。

采纳答案by Raghuram

  • Start with Eclipse Indigo Java EE edition
  • m2eis the maven integration for Eclipse. Install this plugin in the IDE.
  • Import maven project if you have any or create a new one
  • 从 Eclipse Indigo Java EE 版开始
  • m2e是 Eclipse 的 maven 集成。在 IDE 中安装此插件。
  • 如果您有任何项目,请导入 Maven 项目或创建一个新项目

mvn install:install-fileis used to install maven artifacts in local repository, if it cannot be automatically downloaded and installed by maven. This is not normally required, but if you have to do this, you can go to Run as-> Run Configurations...and create an appropriate Maven Buildconfiguration.

mvn install:install-file用于在本地存储库中安装 maven 工件,如果 maven 无法自动下载和安装。这通常不是必需的,但如果您必须这样做,您可以转到Run as->Run Configurations...并创建适当的Maven Build配置。

maveideis not maintained and not to be referred.

maveide没有维护,也不会被引用。

回答by FrVaBe

If you are running eclipse Indigo for Java EE you can install the missing m2e plugin this way:

如果您正在为 Java EE 运行 eclipse Indigo,您可以通过以下方式安装缺少的 m2e 插件:

Help-> Install new software -> Work with: Indigo -> General Purpose Tools -> m2e

Help-> Install new software -> Work with: Indigo -> General Purpose Tools -> m2e

See also: Where is m2eclipse?

另请参阅:m2eclipse 在哪里?

回答by mliebelt

In the Indigo release, Maven is already included by the eclipse plugin m2e. At the plugins website, you will find plenty of material. The steps are normally:

在 Indigo 版本中,Eclipse 插件m2e已经包含了 Maven 。在插件网站上,您会找到大量资料。步骤通常是:

  1. Install eclipse with m2e
  2. Install separately a current maven version(depending on what you need, Maven 2.2.x or Maven 3.0.x)
  3. Configure your installed Maven inside Eclipse due to the documentation. Do that in the section Window > Preferences > Maven > Installations. If that is not visible in Eclipse, you first have to install m2e with the normal installation procedure: Help > Install New Software > Work with: Indigo > Filter text: m2e > Collaboration > m2e. Then next, next, next ...
  1. 使用 m2e 安装 eclipse
  2. 单独安装当前的 Maven 版本(取决于您的需要,Maven 2.2.x 或 Maven 3.0.x)
  3. 根据文档在 Eclipse 中配置已安装的 Maven。在部分中执行此操作Window > Preferences > Maven > Installations。如果这在 Eclipse 中不可见,您首先必须使用正常的安装过程安装 m2e:Help > Install New Software > Work with: Indigo > Filter text: m2e > Collaboration > m2e. 然后下一个,下一个,下一个……

Hope that helps.

希望有帮助。

回答by Prashanth Sams

Eclipse > Help > Eclipse Marketplace...

Eclipse > 帮助 > Eclipse 市场...

Search for m2e

搜索 m2e

Install Maven Integration for Eclipse (Juno and newer). [It works for Indigo also]

安装Maven Integration for Eclipse (Juno and newer). [它也适用于 Indigo]

enter image description here

在此处输入图片说明