Version Requirements maven3.2.3
Software download
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz
Installation
Tar vxf apache-maven-3.2.3-bin.tar.gz
$ MV Apache-maven-3.2.3/usr/local/maven3
Modify environment variables,
Add the following lines in the/etc/profile
Maven_home=/usr/local/maven3
Export Maven_home
Export Path=${path}:${maven_home}/bin
Remember to execute source/etc/profile to make the environment variable effective.
Verify
Finally run mvn-v to verify that MAVEN is installed successfully and print the following if the installation is successful
Apache Maven 3.2.3 (33F8C3E1027C3DDDE99D3CDEBAD2656A31E8FDF4; 2014-08-12t04:58:10+08:00)
Maven Home:/usr/local/maven3
Java version:1.7.0_65, Vendor:oracle Corporation
Java Home:/usr/lib/jvm/java-7-openjdk-amd64/jre
Default Locale:en_us, Platform Encoding:utf-8
OS name: "Linux", Version: "3.13.0-35-generic", Arch: "AMD64", Family: "Unix"
Create a MAVEN project
MVN Archetype:create-dgroupid=helloworld-dartifactid=helloworld
Linux under Maven installation