Pages

Friday, April 20, 2012

Installing Apache Maven 3.0.4 in Ubuntu 11.10

Installing Apache Maven 3.0.4

  1. mkdir ~/softwares
  2. cd ~/softwares
  3. Get the latest release from Apache web site using the command
    wget http://mirrors.sonic.net/apache/maven/binaries/apache-maven-3.0.4-bin.tar.gz
  4. Unpack the .gz file using command
    tar -zxf apache-maven-3.0.4-bin.tar.gz
  5. Create a link to this called apache-maven as that makes easy to update new releases. Use the command below for this
    ln -s apache-maven-3.0.4/ apache-maven
  6. Set the environment variable, open /etc/environment file
    sudo vi /etc/environment
  7. Append the following to the file
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/manohar/softwares/apache-maven/bin"
    JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.06
    M2_HOME=/home/manohar/softwares/apache-maven
    MAVEN_HOME=/home/manohar/softwares/apache-maven
    M2_HOME=/home/manohar/softwares/apache-maven
  8. Log out and login again to see the effect.
  9. Test maven installation using the command
    mvn -version

No comments:

Post a Comment