简体   繁体   English

如何在eclipse上安装maven

[英]how install maven on eclipse

i want to install maven plug in on eclipse. 我想在eclipse上安装maven插件。 but when add the maven site in install software section, and beginning to download and install it, an error occurred about dependency. 但是当在安装软件部分添加maven站点并开始下载并安装它时,依赖关系发生了错误。 how can fix it? 怎么解决呢? i want a complete installation guide... 我想要一份完整的安装指南......

Do these steps: 执行以下步骤:

  1. In Eclipse, go to "Help->Install New Software". 在Eclipse中,转到“帮助 - >安装新软件”。

  2. Press "Add" in the upper right button in the opened window. 在打开的窗口中按右上角的“添加”。

  3. Set the name textbox to be "Maven2Eclipse". 将名称文本框设置为“Maven2Eclipse”。

  4. Set the value textbox to be http://download.eclipse.org/technology/m2e/releases 将值文本框设置为http://download.eclipse.org/technology/m2e/releases

    In case the link is not valid, get one from http://www.eclipse.org/m2e/download/ 如果链接无效,请从http://www.eclipse.org/m2e/download/获取一个链接

  5. Press Ok, select the Maven project, and install it. 按确定,选择Maven项目,然后安装它。

first which dependencies are missing? 首先缺少哪些依赖项? A good maven plugin for eclipse is the eclipse maven sonatype, m2eclipse . eclipse的一个好的maven插件是eclipse maven sonatype, m2eclipse

Install Maven Plugin for Eclipse 安装Eclipse的Maven插件

Installing a Maven Plugin for Eclipse can be a bit tricky if you want to get the whole spectrum of features. 如果要获得全部功能,安装Eclipse的Maven插件可能有点棘手。 By default you would go to “Eclipse -> Help -> Software Updates -> Find and Install”, then “Search for new features to install”, then click on “New Remote Site”, and enter the Maven Projects name (eg Maven2Plugin) and its home URL there “ http://m2eclipse.codehaus.org/ “. 默认情况下,您将转到“Eclipse - >帮助 - >软件更新 - >查找并安装”,然后“搜索要安装的新功能”,然后单击“新建远程站点”,并输入Maven项目名称(例如Maven2Plugin) )及其主页URL“ http://m2eclipse.codehaus.org/ ”。

Once you install it at first everything would seem quite right. 一旦你安装它,一切看起来都很正确。 However, if you try “Import” a Maven Project, you will not see such an option in under the “General” menu, since it would be missing. 但是,如果您尝试“导入”Maven项目,您将不会在“常规”菜单下看到这样的选项,因为它将丢失。

The reason for that is that “ http://m2eclipse.codehaus.org/ ” brings in an old version of the plugin. 原因是“ http://m2eclipse.codehaus.org/ ”引入了旧版本的插件。 (At the moment of writing) It brings in “Maven 2 Plugin 0.0.9″, whereas what you need is 0.0.12. (在写作的那一刻)它带来了“Maven 2 Plugin 0.0.9”,而你需要的是0.0.12。

Hence you read the “Maven Integration for Eclipse” installation guide and point your “New Remote Site” to “ http://m2eclipse.codehaus.org/update/ ” instead of “ http://m2eclipse.codehaus.org/ “. 因此,您阅读了“Maven Integration for Eclipse”安装指南,并将“新远程站点”指向“ http://m2eclipse.codehaus.org/update/ ”而不是“ http://m2eclipse.codehaus.org/ ”。 The one thing to be cautious about is an “update” link will try to also bring “subclipse” and “mylin” projects, hence you will need to “uncheck” them if you do not want to bring them: 需要注意的一点是“更新”链接会尝试带来“subclipse”和“mylin”项目,因此如果你不想带它们,你需要“取消选中”它们:

行家

⸺ from https://blog.dotkam.com/2008/02/24/install-maven-plugin-for-eclipse/ from https://blog.dotkam.com/2008/02/24/install-maven-plugin-for-eclipse/

Steps to install maven plugin into eclipse: 将maven插件安装到eclipse中的步骤:

In eclipse : 在日食:

  1. go to Help->install new software. 转到帮助 - >安装新软件。
  2. Copy this link http://download.eclipse.org/technology/m2e/releases on "Work With" edit box. 在“使用”编辑框中复制此链接http://download.eclipse.org/technology/m2e/releases
  3. Select enter and maven link will appear on Name section. 选择输入和maven链接将出现在名称部分。
  4. Select that link and follow the steps to instal it on eclipse. 选择该链接并按照步骤在eclipse上安装它。

    You can find more information regarding different maven builds for eclipse here: http://eclipse.org/m2e/download/ 您可以在此处找到有关eclipse的不同maven构建的更多信息: http//eclipse.org/m2e/download/

STEPS TO INSTALL MAVEN (in Eclipse) : 安装MAVEN的步骤(在Eclipse中)
Maven Eclipse plugin installation step by step: Maven Eclipse插件安装一步一步:
1. Open Eclipse IDE 1.打开Eclipse IDE

  1. Click Help -> Install New Software... 单击帮助 - >安装新软件...

  2. Click Add button at top right corner 单击右上角的“添加”按钮

  3. At pop up: fill up Name as "M2Eclipse" and Location as " http://download.eclipse.org/technology/m2e/releases " 在弹出窗口中:将Name填写为“M2Eclipse”,将Location填写为“ http://download.eclipse.org/technology/m2e/releases

Now click OK After that installation would be started. 现在单击“确定”。此安装将开始。

Another way to install Maven plug-in for Eclipse: 另一种为Eclipse安装Maven插件的方法:

  1.    Open Eclipse

  2.    Go to Help -> Eclipse Marketplace

  3.    Search by Maven

  4.    Click "Install" button at "Maven Integration for Eclipse" section

  5.    Follow the instruction step by step

After successful installation do the followings in Eclipse: 安装成功后,在Eclipse中执行以下操作:
1. Go to Window --> Preferences 1.转到窗口 - >首选项
2. Observe, Maven is enlisted at left panel 2.观察,Maven入选左侧小组

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM