Installing Maven

Step 1: Download a stable release and unpack the tarball in a suitable place on your workstation:
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
tar -xzf apache-maven-3.0.5-bin.tar.gz

Step 2: It's handy to put Maven on your path to make it easy to launch:
vim /etc/profile
export MAVEN_HOME=/home/<username>/Software/apache-maven-3.0.5
export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile

Step 3: Try typing mvn -version to get usage instructions.

猜你喜欢

转载自jiyuanpeng.iteye.com/blog/1842280