(2) Maven installation and environment configuration, and maven installation environment Configuration

Source: Internet
Author: User

(2) Maven installation and environment configuration, and maven installation environment Configuration

To install Apache Maven on Windows, you need to download the Maven zip file, decompress it to the directory you want to install, and configure Windows environment variables.

Required tools:

1. JDK

2. Maven

3. Windows 7

Note

Maven 3.2 requires JDK 1.6 or later, while Maven 3.0/3.1 requires JDK 1.5 or later.

 

1. JDK and JAVA_HOME

Make sure that you have installed JDK and added the "JAVA_HOME" variable to the Windows environment variable.

JDK installation and environment configuration will not be described much.

 

2. Download Apache Maven

: Http://maven.apache.org/download.html. Open the link and find the download link,

Alan is the old version of 3.0.4 that has been downloaded before. It is no problem to use it, so he is too lazy to download the latest version. You can download the latest version here.

Unzip the downloaded installation package to a specific directory, assuming you decompress it to the folder-D: \ apache-maven-3.0.4,

 

3. Add M2_HOME and MAVEN_HOME

M2_HOME or MAVEN_HOME
Maven only adds M2_HOME, but some projects still reference the Maven folder MAVEN_HOME. Therefore, it is added for security.

Alan is using M2_HOME.

 

4. Add to Environment Variable-PATH

Edit the PATH variable and add the Maven bin folder to the end of the PATH, for example, % M2_HOME % \ bin. Then you can run the Maven command in any directory of the command.

 

5. Verify

Enter mvn-version in the command line. The following interface is displayed, indicating that maven has been installed successfully.

 

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.