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.
- 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
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.tarFind 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 itIf you discover no symlink, then run just the last line.
Find out the Ant's version now:
ant -versionThe 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.
- In order to use FTP task (see http://ant.apache.org/manual/install.html):
- Get Jakarta ORO package from http://jakarta.apache.org/oro/
- Get Commons NET package from http://commons.apache.org/downloads/index.html
- 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
Created by Valdis Vītoliņš on 2013-09-08 13:40
Last modified by Valdis Vītoliņš on 2013-09-08 13:41