1. First download the MAVEN installation package at the official website, address: http://maven.apache.org/download.cgi, the latest version is 3.2.5
2. Unzip the file when the download is complete
tar xzvf apache-maven-3.2. 5
After extracting the file name is apache-maven-3.2.5, you can move the extracted files to the directory you want to install
MV apache-maven-3.2. 5 ~/ubuntutools/
3. Configure environment variables, sudo vim/etc/profile or sudo gedit/etc/profile, add at the end of the file
Export m2_home=/home/yu/ubuntutools/apache-maven-3.2. 5 export M2= $M 2_home/binpath= $M 2: $PATH
4. Exit after saving, run Source/etc/profile to make environment variable effective
5. Open Terminal input mvn-v output
Apache Maven3.2.5(12A6B3ACB947671F09B81F49094C53F426D8CEA1; the- A-15T01: in: at+ ,:xx) Maven Home:/home/yu/ubuntutools/apache-maven-3.2.5Java Version:1.7. 0_21, Vendor:oracle Corporationjava home:/usr/lib/jvm/java/Jredefault LOCALE:ZH_CN, platform Encoding:utf-8OS Name:"Linux", Version:"3.8.0-19-generic", Arch:"i386", Family:"Unix"
MAVEN installation succeeded.
6. In the process of using MAVEN, you need to configure the dependency packages required for the project, you can go to search at the following address
http://www.mvnrepository.com/
Installing MAVEN under Linux