Wednesday, December 12, 2012

Install Maven 3 on Amazon EC2 Ubuntu

Choose a location of your choice
cd /opt/tools

Download Maven 3
wget ftp://mirror.csclub.uwaterloo.ca/apache/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz

Unpack Maven
tar -xzvf apache-maven-3.0.4-bin.tar.gz

Add java and maven environment variables:
sudo vi ~/.bashrc
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

export M2_HOME=/opt/tools/apache-maven-3.0.4
export MAVEN_HOME=/opt/tools/apache-maven-3.0.4
export M2=/opt/tools/apache-maven-3.0.4/bin
export PATH=/opt/tools/apache-maven-3.0.4/bin:$PATH
Save ~/.bashrc
source ~/.bashrc 
Test Maven:
mvn --version




3 comments:

  1. URL you used seems not working ... probably is better to use this

    http://ftp.cixug.es/apache/maven/maven-3/3.1.0/binaries/apache-maven-3.1.0-bin.tar.gz

    to download binaries

    ReplyDelete
    Replies
    1. Thanks Rafael! My link is probably outdated.

      Delete
  2. Are you trying to make cash from your traffic with popup ads?
    If so, did you ever use Pop Cash?

    ReplyDelete