Steps and reference articles for installing Maven at home Win7

Source: Internet
Author: User

Maven Combat series installs Maven on Windows

cy163 Note: value in path:%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\ Windowspowershell\v1.0\; C:\Program Files\intel\dmix;%java_home%\bin;%java_home%\jre;%m2_home%\bin

Http://jingyan.baidu.com/article/1709ad808ad49f4634c4f00d.html

MAVEN is an excellent build tool (similar to ant, but more user-friendly than ant) and helps us automate the build process, from cleanup, compilation, testing, to generating reports, to packaging and deployment. Simply by entering simple commands, MAVEN can help us with the tedious tasks of the build process.

Tools/Materials
    • Windows system
    • JDK 1.5 and later
    • Maven 3.2.5
Method/Step
  1. Download Maven's installation package, download link: http://maven.apache.org/download.cgi

    , click the apache-maven-3.2.5-bin.zip link to download the Mavn package for version 3.2.5.

  2. After the downloaded file is Apache-maven-3.2.5-bin.zip compressed package, unzip it to a fixed folder. Mine is extracted to the C:\tools directory, update maven only need to download a new MAVEN package, extract to this directory and follow the third step to modify the environment variables.

  3. Modify environment variables. Open the System Properties panel (on the desktop, right-click on "My Computer", "Properties", "Advanced system Settings"), then click "Environment Variables", "New", enter "M2_home" and Maven decompression root directory path (i extracted to c \ Tools so the complete path is C:\tools\apache-maven-3.2.5), then click OK, and then find the system variable named path, click on the Select and click "Edit", will%m2_home%\bin; Add to the beginning of the variable value (note that the last semicolon is also to be added).

  4. Verify that the installation is successful. Click "Start" in the lower left corner of Windows, type cmd in the search box, then enter to open the Windows Command Prompt window, then enter the Echo%m2_home% command to view the settings of the environment variable, enter MVN-V to view the version of Maven, If the installation succeeds, the display looks like this:

  5. Build the Maven local repository. In a MAVEN project, the user does not need to download the dependent jar package and put it into the project as before, only need to define the project's Pom.xml file, and maven will automatically download the corresponding package from the network to the local warehouse when using the MAVEN command on the project, and the project can use the package of the local warehouse directly. When you install Maven for the first time, enter the MVN help:system command in the Windows Command Prompt window and then enter, and then you can see some of the files that Maven downloaded in C:\Users\Admin\.m2\repository after it finishes executing.

    Note: This step must be performed in a networked situation.

  6. User-defined configuration. MAVEN has a global profile for the MAVEN root directory/conf/settings.xml file (for example, mine is C:\tools\apache-maven-3.2.5\conf\ settings.xml), MAVEN uses this configuration file by default, and all users share this configuration. However, it is recommended that each user configure their own profile to prevent the non-impact of other users in the system, simply copy the global configuration file to the. M2 folder in the user directory (my current user is Admin, so copy is C:\Users\Admin\.m2\ settings.xml). (If you do not have a. M2 folder, go to the previous step, and Maven generates the. M2 folder in the current user's directory.)

    END
Precautions
    • JDK must be installed, you can enter the java-version command in the Command Prompt window to view the JDK version

Steps and reference articles for installing Maven at home Win7

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.