cygport/cygclass/ant.cygclass

Cygport Reference Manual

### TABLE OF CONTENTS

- ant.cygclass

- ANT
- ANT_HOME
- ANT_OPTS
- ANT_BUILD_XML
- cygant
- doanttask
- ANT_BUILD_ARGS
- ANT_BUILD_TARGETS
- src_compile (ant)
- ANT_TEST_ARGS
- ANT_TEST_TARGETS
- src_test (ant)
- ANT_INSTALL_JARS
- ANT_INSTALL_JAVADOC
- ANT_INSTALL_TASKS
- ANT_INSTALL_WRAPPERS
- ant_install
- src_install (ant)

## ant.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

      inherit ant

DESCRIPTION

Apache Ant is a build system written in Java and used in many Java projects. The build is controlled by a single XML file, named 'build.xml' by default, which specifies the targets to be built, the commands to build them, and the options which may be given to control the build.

Ant includes support for a number of commands (called tasks), including compiling and executing Java code, generating documentation, downloading files, de/compressing archives, and running testsuites. Third-party Ant tasks also exist to support additional commands.

This cygclass builds packages which use the Ant build system.

INHERITS

java.cygclass

REQUIRES

ant

## ANT

[ Top ] [ ant.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Ant build tool.

## ANT_HOME

[ Top ] [ ant.cygclass ] [ Definitions ]

DESCRIPTION

Root datadir for the Ant build tool. This definition is exported to the build environment.

## ANT_OPTS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Options for the Ant build tool to pass to the Java runtime, e.g. -Xmx. This definition is exported to the build environment.

## ANT_BUILD_XML

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Name or relative path of the Ant build file. This need only be defined if it is not build.xml (the default).

## cygant

[ Top ] [ ant.cygclass ] [ Compile Functions ]

SYNOPSIS

      cygant [OPTIONS]

DESCRIPTION

Runs Ant with the given options, if any.

## doanttask

[ Top ] [ ant.cygclass ] [ Install Functions ]

SYNOPSIS

      doanttask JAR_FILE [JAR_FILE] ...

DESCRIPTION

Installs the given .jar file(s) into the Ant task directory.

## ANT_BUILD_ARGS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Arguments to pass to the Ant build command if this src_compile is used.

## ANT_BUILD_TARGETS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Target(s) to be built during the Ant build command if this src_compile is used.

## src_compile (ant)

[ Top ] [ ant.cygclass ] [ Overloads ]

DEFINITION

    src_compile() {
            lndirs
            cd ${B}
            cygant ${ANT_BUILD_ARGS} ${ANT_BUILD_TARGETS}
    }

## ANT_TEST_ARGS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Arguments to pass to Ant during testing if this src_test is used.

## ANT_TEST_TARGETS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Target(s) to be built to run the testsuite if this src_test is used.

## src_test (ant)

[ Top ] [ ant.cygclass ] [ Overloads ]

DEFINITION

    src_test() {
            cd ${B}
            ANT_TASKS="${ANT_TASKS} junit" cygant ${ANT_TEST_ARGS} ${ANT_TEST_TARGETS:-test}
    }

## ANT_INSTALL_JARS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Relative paths of .jar files to be installed by ant_install.

## ANT_INSTALL_JAVADOC

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Relative paths of javadoc directories to be installed by ant_install.

## ANT_INSTALL_TASKS

[ Top ] [ ant.cygclass ] [ Variables ]

DESCRIPTION

Relative paths of Ant task .jar files to be installed by ant_install.

## ANT_INSTALL_WRAPPERS

[ Top ] [ ant.cygclass ] [ Variables ]

SYNOPSIS

      ANT_INSTALL_WRAPPERS="name1,name1.jar[,main.class1] name2,name2.jar[,main.class2] ..."

DESCRIPTION

Comma-delineated set of arguments to pass to java_wrapper. Multiple wrappers can be created by separating the argument sets with spaces.

## ant_install

[ Top ] [ ant.cygclass ] [ Install Functions ]

SYNOPSIS

      ant_install

DESCRIPTION

Installs the files and directories specified by ANT_INSTALL_JARS, ANT_INSTALL_JAVADOC, and/or ANT_INSTALL_TASKS, at least one of which must be defined.

## src_install (ant)

[ Top ] [ ant.cygclass ] [ Overloads ]

DEFINITION

    src_install() {
            cd ${B}
            ant_install
    }