MAVEN Installation and Environment configuration (Windows)

Source: Internet
Author: User

1. Download the installation package

Download the latest version of the installation package on the MAVEN website:

2. Unpack the installation package 3, configure the MAVEN environment variable

Configure the M2_home environment variable, point to the MAVEN installation directory, and append the bin directory to the path path for easy invocation at the command line.



Add the MAVEN environment variable in the/etc/profile file as follows:

export M2_HOME=/opt/mavenexport PATH=$PATH:$M2_HOME/bin
    • 1
    • 2
4. Verification

Execute mvn–version at the command line, if the displayed information indicates that MAVEN has been successfully installed

5, copy the global configuration file to the user directory

Copy the%m2_home%\config\settings.xml file to the%USER_HOME%.M2 directory for the current user to override the global settings for MAVEN settings.

6. Modify the IDE's built-in maven

To ensure consistency in the command line execution of the MVN command and the MVN command executed in the IDE, you need to modify the IDE's built-in maven for our own download

1> Eclipse/myeclipse (both Eclipse and myeclipse use the M2eclipse plug-in, set up the same way):

Take the Eclipse4.5 version of the Java EE version as an example:
Window–> preferences–> Enter maven–> in the Filter box installations–> add and select the maven you downloaded on the right. As shown in the following:

MAVEN Installation and Environment configuration (Windows)

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: 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.