Note, that this recipe is not updated long time and could be outdated!
Got it.

Ant building tool

Standard version

Ant can be installed via command

sudo apt-get install ant

Custom version

If this does not install the version we need, it is possible to install manually from the tarball installation file.

  1. Download the newest Ant binary distribution from their homepage; pick the  ".tar.gz" file. At the time of the writing it is apache-ant-1.7.0-bin.tar.gz 
  2. Unzip this installation, and copy the directory "apache-ant-1.7.0" to /usr/share:

    su - root
    cd /home/student/downloads
    tar xzf apache-ant-1.7.0-bin.tar.gz
    mv apache-ant-1.7.0 /usr/share/
    rm apache-ant-1.7.0-bin.tar
  3. Find out, if the symlink "ant" points to anything:

    which ant
    # assume, it gives the reply "/usr/bin/ant"
    ant -version
    # if this is the newest, e.g. 1.7, then stop here
    ls -al /usr/bin/ant
    # list symlink's target
    rm /usr/bin/ant
    # delete the symlink
    ln -s /usr/share/apache-ant-1.7.0/bin/ant /usr/bin/ant
    # define a new value for it

    If you discover no symlink, then run just the last line.

  4. Find out the Ant's version now:

    ant -version

    The version should switch to (at least) 1.7.0.

Ant custom tasks

You may need to configure Ant further in order to use custom tasks.

  1. In order to use FTP task (see
    1. Get Jakarta ORO package from
    2. Get Commons NET package from
    3. Copy JAR files found in these packages to "/usr/share/apache-ant-1.7.0/lib" (it is convenient to use Midnight Commander (mc) to extract needed JARs from larger packages and copy them).

Created by Valdis Vītoliņš on 2008-08-08 09:57
Last modified by Valdis Vītoliņš on 2013-09-08 16:41
Translated into en by Valdis Vītoliņš on 2013-09-08 16:40
Xwiki Powered
Creative Commons Attribution 3.0 Unported License