Summarize the installation of the Maven plugin in eclipse

Source: Internet
Author: User

http://blog.csdn.net/wode_dream/article/details/38052639

As you get more and more exposed to open source projects, you find that most of the open source projects are built with MAVEN. And when it comes to developing applications, it's becoming increasingly aware that Maven does solve a lot of problems, if you want to understand Maven, you can refer to the Maven Getting Started Guide (i) and the Maven Getting Started Guide (ii). So I also learned to use Maven. The following are references to the content on the Internet, some made some minor changes, and noted the source.

The first part: the original link

MAVEN3 Installation:

Before installing Maven, you need to make sure that your JDK is installed and configured. MAVEN is a project under Apache, and the latest version is 3.0.4, and that's what I'm using.

First go to the official website to download maven:http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz

After the download is done, unzip it, I rename the extracted folder to maven and place it in the D:\Server directory, where Maven's final path is: D:\Server\maven


To configure the MAVEN environment variable:

System variable: maven_home = D:\Server\maven

User variable: path =%maven_home%\bin

I believe that we all have to match the environment variables, the detailed steps will not say, to the attribute name and attribute values to match the OK.

Open cmd, knock inside: mvn-version


If you can print the information above, it means that the MAVEN3 has been installed on your PC.
MVN is a mavn instruction, mvn-version is to view the version information, my operating system is 32-bit WIN7, the installation of MAVEN is 3.0.4

If you can print the information above, it means that the MAVEN3 has been installed on your PC.


To modify the MAVEN repository storage location:

Find the Settings.xml configuration file under Maven under Conf, mine is in D:\Server\maven\conf\settings.xml



The MAVEN repository defaults to the. M2 folder under the local user's Temp folder under Repository, mine is under the C:\Users\admcnm\.m2\repository directory,

Now let's modify to assign it to our own path, I'm now going to assign the repository to the D:\Repositories\Maven directory, just open the local repository that was logged off.

Then write the corresponding path value in it:

OK, first to experience maven, knock in CMD and enter to execute: MVN help:system

This is when Maven downloads a whole bunch of stuff from the remote repository, it's okay, it's downloaded, it's going to be downloaded sooner or later, and then the MAVEN plugin is installed in eclipse.

Then install the Eclipse plugin online:: Help-and install New software, and then enter the HTTP address for installation (http://download.eclipse.org

), you can find the corresponding version in this link.

At last:

Check that the Maven plugin for Eclipse is installed successfully: Window--Preferences




To configure MAVEN:
1. Click the Add button to select the path value of your native MAVEN installation




2. Click the Browse button, select your Maven setting.xml profile, then click OK to complete the configuration of the Eclipse Maven plugin

Ii. errors you may encounter when installing the Maven plugin in Eclipse: original link 1, original link 21. When installing M2eclipse, how to solve this kind of error? Please see the error for more information.
Issue: Cannot complete the install because one or more required items could not be found.

Software being Installed:maven integration for Eclipse (Required) 0.12.1.20110112-1712 (or
G.maven.ide.eclipse.feature.feature.group 0.12.1.20110112-1712)

Missing requirement:maven Project Model Edit Bundle 0.12.1.20110112-1712 (org.maven.id
E.eclipse.maven_model_edit 0.12.1.20110112-1712) requires ' bundle Org.eclipse.emf.ecore 0.
0.0 ' But it could wasn't be found

Cannot satisfy dependency:

From:maven Integration for Eclipse (Required) 0.12.1.20110112-1712 (org.maven.ide.eclip
Se.feature.feature.group 0.12.1.20110112-1712)

To:org.maven.ide.eclipse.maven_model_edit [0.12.1.20110112-1712] He said there was a file that couldn't be found.
。 But in the link to Maven's m2e, the relevant files are there. Tried a lot of times. All have this problem.
Workaround: connect Helios Update site (helios-http://download.eclipse.org/releases/helios) First, install
Plugin graphical Editing Framework Zest visualization Toolkit SDK. Then install M2eclipse plug-ins.
2: If the installed plug-in version is too high will be reported
Cannot complete the install because one or more required items could not be  found.    Software being installed: m2e - Maven Integration for Eclipse (includes I   ncubating components) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature.   group 1.5.0.20140606-0033)    Missing requirement: Maven Integration for Eclipse 1.5.0.20140606-0033 (o   rg.eclipse.m2e.core 1.5.0.20140606-0033) requires ‘bundle com.google.guava    [14.0.1,16.0.0)‘ but it could not be found      Cannot satisfy dependency:        From: Maven Integration for Eclipse 1.5.0.20140606-0033 (org.eclipse.m2   e.core.ui 1.5.0.20140606-0033)        To: bundle org.eclipse.m2e.core [1.5.0,1.6.0)      Cannot satisfy dependency:        From: m2e - Maven Integration for Eclipse (includes Incubating componen   ts) 1.5.0.20140606-0033 (org.eclipse.m2e.feature.feature.group 1.5.0.201406   06-0033)   答案:这种情况换一个低版本的安装,如  http://download.eclipse.org/technology/m2e/milestones/1.4

Summarize the installation of the Maven plugin in eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.