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 http://ant.apache.org; 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 http://ant.apache.org/manual/install.html):
    1. Get Jakarta ORO package from http://jakarta.apache.org/oro/
    2. Get Commons NET package from http://commons.apache.org/downloads/index.html
    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).

  
Tags Programmēšana Java
Created by Valdis Vītoliņš on 2013-09-08 13:40
Last modified by Valdis Vītoliņš on 2013-09-08 13:41
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License