From 4791ccae3f2ec9adcc184b8df921cdd3fa43d46e Mon Sep 17 00:00:00 2001
From: Conor MacNeill
- To build and use ant you must have a JAXP compliant XML parser installed and available on your classpath. + To build and use Ant you must have a JAXP compliant XML parser installed and available on your classpath.
- If you do not have a JAXP compliant XML parse installed, you may use the reference implementation - available from Sun. It is available from http://java.sun.com/xml/. - Once installed make sure the "jaxp.jar" and "parser.jar" files are in your classpath. + Both the binary and source distributions of Ant include the reference implementation of JAXP 1.0. + Please see http://java.sun.com/xml/ for more information. + If you wish to use a different, JAXP-compliant parser, you should remove jaxp.jar and parser.jar + from Ant's lib/core directory. You can then either put the jars from your preferred parser into Ant's + lib/core directory or put the jars on the system classpath.
- You will also need the JDK installed on your system, version 1.1 or later. + For the current version of Ant, you will also need the JDK installed on your system, version 1.1 + or later. A future version of Ant will require JDK 1.2 or later.
-Go to the directory jakarta-ant
.
Make sure the JDK is in you path.
-Set the JAVA_HOME environment variable. This should be set to the -directory where the JDK is installed. See Installing Ant -for examples on how to do this for your operating system.
-Make sure you have downloaded any auxilliary jars required to build tasks you are interested in. The list of auxilliary tasks and requirements is in lib/README
-Run bootstrap.bat
(Windows) or bootstrap.sh
(UNIX)
-to build a bootstrap version of Ant.
When finished, use
----
build.bat -Dant.dist.dir=<directory to install Ant> dist
for Windows, and
----
build.sh -Dant.dist.dir=<directory to install Ant> dist
for UNIX, to create a binary distribution of Ant. This distribution can be -found in the directory you specified.
+The binary distribution of Ant consists of three directories: bin
,
-docs
and lib
. Only the bin
and lib
-directory are crucial for running Ant. To run Ant, the following must be done:
The binary distribution of Ant consists of four directories: bin
,
+docs
, lib
and src
. Only the bin
+and lib
directory are required for running Ant. To run Ant, the
+following must be done:
bin
directory to your path.ant.home
must be set to the directory containing a bin directory, which contains the antRun
shell script necessary to run execs on Unix.
+
+To build ant you should install the Ant source distribution. Whilst the binary distribution +includes the Ant source code, it is intended for reference purposes only. The boostrap and +build scripts used to build ant itself are not included in the binary distribution +
+
Once you have installed the source distribution, go to the
+directory jakarta-ant
.
Set the JAVA_HOME environment variable. This should be set to the +directory where the JDK is installed. See Installing Ant +for examples on how to do this for your operating system.
+Make sure you have downloaded any auxilliary jars required to build tasks you are +interested in. These should either be available on the classpath or added to Ant's lib +directory. The list of auxilliary tasks and requirements is in lib/README
+ +Run bootstrap.bat
(Windows) or bootstrap.sh
(UNIX)
+to build a bootstrap version of Ant.
When finished, use
++++
build -Dant.dist.dir=<directory to contain Ant distribution> dist
for Windows, and
++++
build.sh -Dant.dist.dir=<directory to Ant distribution> dist
for UNIX, to create a binary distribution of Ant. This distribution can be +found in the directory you specified.
+ +If you wish to install the build into the current ANT_HOME directory, you can use +++ +You can avoid the length Javadoc step, if desired, with ++
build install
(Windows)+
build.sh install
(Unix)
++This will only install the bin and lib directories. ++
build mininstall
(Windows)+
build.sh mininstall
(Unix)
Both the install
and
+mininstall
targets will overwrite
+the current ant version in ANT_HOME.
+
Running Ant is simple, when you installed it as described in the previous
section. Just type ant
.
When nothing is specified, Ant looks for a build.xml
file in the current directory. When found, it uses that file as a
-buildfile, otherwise it searches in the parent directory and so on
-until the root of the filesystem has been reached. To make Ant use
+buildfile. If you use the -find option, Ant will search for a build file in
+the parent directory and so on until the root of the filesystem
+has been reached. To make Ant use
another buildfile, use the commandline option -buildfile
<file>, where <file> is the buildfile you want
to use.