Install all about Java Maven

Source: Internet
Author: User

A few months later .. It was a busy couple of months. Recently, we were working on the CAS identity authentication system. The new version of CAS needs to be built using Maven, so we need to study Maven-related materials. The first step is to download and install Maven. Maven can be easily installed on the local machine according to the official website documentation. The procedure is as follows:

  1. Download the built project from the official download page (you can also get the source code back to your own build) http://maven.apache.org/download.cgi (I downloaded the marked red box that)
  2. Check the JDK environment. To run Maven, you must install JDK. Only JRE does not work. JDK requires 1.5 or an updated version. (It doesn't matter if you can use jdk1.3 in earlier versions to compile maven)
  3. Decompress the downloaded zip package, which contains a apache-maven-3.1. × folder, which I putC: \ Program Files \ Apache Software FoundationDirectory
  4. Set environment variables. (You can use the win key and pause key combination to open the system System Properties window. I only know it today ..)

    1) Add the m2_home variable value in the system variable to the path of apache-maven-3.1. × just now, my is c: \ Program Files \ Apache Software Foundation \ apache-maven-3.1.0. For Maven 2.0.9, make sure that the path does not end with the '\' symbol.
    2) Add User VariablesM2 variable value: % m2_home % \ bin
    3) this step is optional. Add the maven_opts variable to the user variable to set JVM parameters. For example, set the value to-xms256m-xmx512m.
    4) Update the PATH variable in the user variable (if not, create one). The added value % M2 % and the previous value (if any) are separated ';'.
    5) Make sure that the java_home variable has been set (pointing to the JDK installation directory) and in the PATH variable (the path in the user variable or in the system variable) the Value % java_home % \ bin exists.

  5. Open the command window win + R and Enter cmd. In the command line window, enter the command MVN -- version to view information about the installed maven. If the information is correct, the installation will come to an end.

 

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.