This article transferred from: http://www.cnblogs.com/fancyzero/archive/2012/06/09/maven3.html
Environment Preparation:
JDK 1.6Maven 3.0.4myeclipse 8.6.1
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
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.
Next, change the location of the MAVEN repository:
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
That's 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 MAVEN is configured into MyEclipse,
Turn on Myeclipse,window-Preferences--and MyEclipse--maven4myeclipse-up Maven
Make sure the JDK is in your own:
Choose Your own maven:
Choose Your own Setting.xml:
The myeclipse itself is already integrated with the Maven plugin, and we simply configure it so that Maven installs it in MyEclipse.
Install Maven3 on MyEclipse