The general configuration for Apache Ant installs on Hudson is available in Section 3.4, “Configuring Ant Installations”. You can read about influencing factors for your Apache Maven install, that apply to your strategy for installing Ant as well in Section 7.1, “Installing and Configuring Apache Maven”.
A common scenario for Apache Ant installs is the requirement of a
build to have access to Ant tasks as provided in
Ant-Contrib like For or If or to
have some required libraries like JSch
for secure copying with scp available on the Ant class-path. Custom
developed Ant tasks can be needed in a similar fashion. A convenient
way to achieve this, is the creation of a custom archive containing
the Ant install as well as additional libraries necessary. This
archive can then be used with the Extract from *.zip/*.tar.gz
option
to get a fully working Ant and dependencies installed on all build
cluster nodes.
After configuring the general project options as documented in Chapter 6, Creating Hudson Projects, you can configure one or more build steps. To add a build step, click on the Add build step button and select Invoke Ant.
The basic and advanced options for invoking Ant are shown in Figure 8.1, “Configuring an Ant Build Steps”.
build.xml
file-name, there is no
need to specify a Build File If your project uses a build file with
an alternative name or path other than directly in the project root,
you can specify that file name and path here. This setting is
equivalent to the command line option -f buildfilepath. The path
specified has to be relative to the project root.