Blog Category:
Maven
First download the latest version of Maven from official web http://maven.apache.org/. I'm using a apache-maven-3.0.4-bin.tar.gz. Copy the downloaded file to the/usr/local/directory.
1. Execute TAR-ZXVF apache-maven-3.0.4-bin.tar.gz command to extract files
2, after decompression will generate apache-maven-3.0.4 directory, delete apache-maven-3.0.4-bin.tar.gz compressed package file
3, the implementation of Ln-s apache-maven-3.0.4 Apache-maven (for maven to do a soft link, easy to upgrade later)
4, execute the Vi/etc/profile file, insert the following content
Export M2_home=/usr/local/apache-maven
Path= $PATH: $JAVA _home/bin: $M 2_home/bin
Export PATH USER LOGNAME MAIL HOSTNAME histsize ...
5. Save and Exit VI Editor, execute source/etc/profile command to make changes effective
6, execute the mvn-v command, such as the following shows that the installation configuration is successful
[email protected]/]# mvn-v
Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
Maven Home:/usr/local/apache-maven /c3>
Java Version:1.6.0_33, Vendor:sun Microsystems Inc.
Java Home:/usr/local/jdk1.6.0_33/jre
Default LOCALE:ZH_CN, platform Encoding:utf-8
OS Name: "Linux", Version: "2.6.32-279.2.1.el6.x86_64", Arch: "AMD64", Family: "Unix"
CentOS 6 installation maven and system configuration