Friday, November 11, 2011

Install Ant and Maven

Install Ant

Download ant from here:

$ tar -zxvf apache-ant-x.x.x-bin.tar.gz
$ su -c "mv apache-ant-x.x.x /opt/ant-x.x.x"

Open .bash_profile and add:

export ANT_HOME=/opt/ant-x.x.x

Install Maven

Download maven from here:

$ tar -zxvf apache-maven-x.x.x-bin.tar.gz
$ su -c "mv apache-maven-x.x.x /opt/maven-x.x.x"

Open .bash_profile and add:

export MAVEN_HOME=/opt/maven-x.x.x

$ source ~/.bash_profile

1 comment:

  1. It is better to add these strings to ~/.profile

    In recent Ubuntu and Debian versions default shell /bin/sh is not equal to /bin/bash (or whatever bash resides). So when you launch Eclipse it receives environment from X11, that receive environment from default shell. So if you launch maven3 inside Eclipse you will get warning "MAVEN_HOME not set".

    If you have several users on the machine that all need some common environment use /etc/profile