Appendix C. Installing Apache Ant
The Java build tool Apache Ant is not required for the installation or normal operation of the JBoss Enterprise Application Platform. However, it is occasionally needed for some configuration tasks and also for building and deploying some applications.
Note
If running a development workstation, Apache Ant may already be installed.
Note
To learn more about
Apache Ant
, visit the project's website at http://ant.apache.org.
Procedure C.1. Installing Apache Ant on Red Hat Enterprise Linux
- Download and install
Apache Ant
on Red Hat Enterprise Linux by issuing this command:[localhost]$ sudo yum install ant
Procedure C.2. Installing Apache Ant on Other Operating Systems
Download and Extract
Download theApache Ant
binary release from http://ant.apache.org/bindownload.cgi.Once it is downloaded, extract it into a preferred installation location, such asc:\Program Files\Apache\Ant\
or/opt/apache-ant-1.8/
.Add the ANT_HOME Environmental Variable
Next, create an environmental variable calledANT_HOME
. This variable has to contain the path created in the previous step.- Do this on Red Hat Enterprise Linux/Hewlett-Packard HP-UX systems by adding the following line to the
~/.bash_profile
file, substituting the path with that created above.export ANT_HOME=/opt/apache-ant-1.7.1
- On Microsoft Windows Server, do this by click on the Start Menu and opening the Control Panel then selecting System -> Advanced -> Environment Variables. Create a new variable named
ANT_HOME
and configure it to point to theant
directory.
Include
bin
in thePATH
Next, append theant
installation'sbin
directory thePATH
environmental variable.- On Red Hat Enterprise Linux/Hewlett-Packard HP-UX systems, add the following line to the
~/.bash_profile
file after the one which sets theANT_HOME
variable:export PATH=$PATH:$ANT_HOME/bin
- On Microsoft Windows Server, do this task by opening the Control Panel then selecting System -> Advanced -> Environment Variables->System Variables -> Path. Create a new variable, calling it
ANT_HOME
. Next, add a semicolon and%ANT_HOME%\bin
to the end of the path value.
To test the Apache Ant installation, run
ant -version
from within a command line shell. The output should look similar to this:
[localhost]$ ant -version Apache Ant version 1.8 compiled on June 27 2008