- Installing Maven
Download Maven http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
After you download Maven, you need to install it easily. Extract the downloaded files to the directory you want to install. Under Simple configuration, environment variables:
1. New environment variable m2_home , enter the installation directory for Maven .
2, the new environment variable M2 , the input value is: %m2_home%\bin .
3, the M2 environment variable is added to the end of Path , such as: ;%m2%;.
Environment variables can be configured in such a simple way. Open the Command Line window and enter mvn-version . You can see the following output:
When you see the above output, your Maven environment is ready to build.
- Here you can use the Oschina Maven service.
There is a settings.xml file under the conf file under the Maven installation directory, and we need to make a simple change to this file.
You can simply back up the file before modifying it. Open the settings.xml file and modify it as follows.
1 <Mirrors>2 <!--Mirror | Specifies a repository mirror site to use instead of a given3 Repository. The Repository that | This mirror serves have an ID of that matches4 The mirrorof element of this mirror. IDs is used | For inheritance and direct5 lookup purposes, and must be unique across the set of mirrors. -6 <Mirror>7 <ID>Nexus-osc</ID>8 <mirrorof>*</mirrorof>9 <name>Nexus OSC</name>Ten <URL>http://maven.oschina.net/content/groups/public/</URL> One </Mirror> A </Mirrors>
more detailed configuration please visit http://maven.oschina.net/help.html
- Installing the Maven plugin in eclipse
Click menu Help, install new software for plug-in installation
Plugin address http://download.eclipse.org/technology/m2e/releases
- Configure the Maven that you installed
Click the Add button of Maven-installations, Preferences, menu window, to select the path to your native installation of Maven
- Choose your Maven setting.xml configuration file
Ok!! Configuration complete
Eclipse installation using Maven