Install Maven 3 on Ubuntu 11.04

41 篇文章 1 订阅
23 篇文章 0 订阅

Install Maven 3 on Ubuntu 11.04

 

1. Download Maven 3 latest version

 

$ cd /home/<myusername>
$ wget http://labs.mop.com/apache-mirror/maven/binaries/apache-maven-3.0.4-bin.tar.gz
tar -zxvf apache-maven-3.0.4-bin.tar.gz

 

2. Unpacks maven to  a more appropriate directory, most people like to use  / usr/local/apache-maven-3.0.4

 

$ tar -xzvf apache-maven-3.0.4-bin.tar.gz -C /usr/local/

 

Add the Maven PATH variables to the environment file. Follwoing two lines are included to user .bashrc file located in my home directory, like /home/user1/.bashrc

 

MAVEN_HOME=/usr/local/apache-maven-3.0.4
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

 

Recompile .bashrc by:

 

$ source .bashrc

 

To test the successful installation run the Maven version checker:

 

$ mvn -version

 

It returns something like:

 

Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
Maven home: /usr/local/apache-maven-3.0.4
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "2.6.38-11-server", arch: "amd64", family: "unix"

 

 

 

On RHEL5.5 redhat linux

wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh ./epel-release-5-4.noarch.rpm
yum install git

wget http://labs.mop.com/apache-mirror/maven/binaries/apache-maven-3.0.4-bin.tar.gz
tar -zxvf apache-maven-3.0.4-bin.tar.gz

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值