Downloads

   Like most Ant extensions, the JWare/AntXtras Foundation package (AntXtras) is a Java-based library. A release consists of three independent components: binaries, documents, and source. You can download the most recent release for each active series from this website; for older releases, visit the AntXtras files release archive. Read the AntXtras Future Plans section to learn the difference between AntXtras v1 series and v2 series.

So you can verify its integrity, every released AntXtras component has an associated MD5 or SHA1 hash value and an OpenPGP signature. To authenticate the various components with any PGP or GnuPG application, download our KEYS file from this website and import them into your public keyring.

The current release has been verified against the Sun J2SE 1.4 and J2SE 1.5 platforms, and the Apache Ant 1.7.0 and 1.7.1 distributions. Up-to-date installation instructions, release notes, and licenses are available for your review before you download. Typical contents of a package are described in the included readme-first file.

Package Type   V1 Series Package Zipped V2 Series Package Zipped
Binaries antxtras_binaries_0.5.1.zip (md5) antxtras_2.0.0_bin..zip (sha1)
Documents antxtras_apidocs_0.5.1.zip (md5) antxtras_2.0.0_doc.zip (sha1)
Sources antxtras_sources_0.5.1.zip (md5) antxtras_2.0.0_src.zip (sha1)


Installing AntXtras

AntXtras’s installation is similar to any optional Ant package. The following instructions describe how to install and verify AntXtras in your runtime environment.

  1. Download, verify, and install an Ant distribution – at least version 1.7.0. Verify that Ant is properly installed. AntXtras only uses components of the standard Ant distribution; optional tasks are not required.

  2. Download, verify, and install an AntXtras distribution. We suggest you download the binary distribution that contains everything you need to use AntXtras immediately. There is also a sample Ant script you can use to verify the installation is working properly. In the remaining steps we use <ANTX_DIR> to refer to the directory into which you extracted the AntXtras distribution.
    • If you must manually generate all binaries for your environment, download the source-only distribution. Be sure you also download the required third-party libraries. You must use JDK version 1.4.2 or later to compile the sources.

  3. Update your Ant runtime environment to include the AntXtras jar file <ANTX_DIR>/lib/jw-antxtras.jar in its classpath. There are several ways of telling Ant about third-party jar files; the easiest method is to copy the files into your Ant distribution’s lib directory. A safer approach is to install AntXtras in its own location and update the CLASSPATH used when you run Ant (for example, by using the -lib option; see “Running Ant” for details). You can also specify a classpath directly to the <taskdef> instruction you use to load AntXtras.

  4. Verify the AntXtras tasks are accessible from Ant. The easiest way to do this is to run Ant against this starter build script. From within the <ANTX_DIR>/etc directory, run `ant -f antxtras-install-check.xml`. This build script doesn’t actually do anything except load the AntXtras antlib and print out its version information. If Ant is unable to locate the AntXtras antlib or its dependencies, even this simple script will fail. In the next section, we describe in detail what this starter script is doing.

  5. Read the Overview page to get an idea of what AntXtras can do for you including a list of the most used features and function shortcuts. Download the “JWare/AntXtras Foundation User Guide” as a thorough off line reference for every AntXtras component including additional examples.

  6. Start using AntXtras!


Loading AntXtras Antlib

Below are the steps you must follow to use AntXtras after you download and expand the AntXtras ‘_bin’ (binaries-only) distribution. If you downloaded the source distribution, you must adjust the first step below to include the location of your local build of AntXtras.

Tip!

All of these steps are reproduced in the starter build script that comes with the ‘_bin’ AntXtras package.
1. Defining path to AntXtras

Define where you’ve installed AntXtras using Ant’s <path> components. In this snippet we assume the project′s basedir is the /etc directory of where you have installed or built the AntXtras distribution.

1: <dirname property="root.d" file="${basedir}"/>
2: <path id="jwtools.path">
3:   <fileset dir="${root.d}/lib">
4:     <include name="jw-antxtras.jar"/>
5:   </fileset>
6: </path>
2. Loading AntXtras into Ant

Load the AntXtras antlib into your Ant script using the path previously defined in step 1.

1: <taskdef resource="org/jwaresoftware/antxtras/install/antlib.xml"
2:     classpathref="jwtools.path"/>
3. Getting AntXtras version information

Verify you can access AntXtras components from your Ant script. The simplest way to do this is to load the AntXtras version information.

1: <target name="about-antxtras">
2:   <vendorinfo name="antxtras"/>
3:   <echo level="info" message="RELEASE: ${antxtras.build.label}"/>
4: </target>


Loading Advanced Antlibs

AntXtras comes with three (3) distinct antlibs to improve maintainability and to partition less-used functionality from the most-common. To load the whole AntXtras universe (core, advanced, etc.) use the following steps instead of the steps above which are for just the core jw-antxtras.jar package.

1. Defining path to AntXtras

Define where you’ve installed AntXtras using Ant’s <path> components. In this snippet we assume the project’s basedir is the /etc directory where you have installed or built the AntXtras distribution.

1: <dirname property="root.d" file="${basedir}"/>
2: <path id="jwtools.path">
3:   <fileset dir="${root.d}/lib">
4:     <include name="*.jar"/>
5:   </fileset>
6: </path>
2. Loading AntXtras into Ant

Load all of the AntXtras antlibs into your Ant script using the paths previously defined in step 1. We also tell Ant in the first call to <taskdef> to cache the classloader that it constructs to load classes from our “jwtools.path” under a reference “jwtools.classloader”. The subsequent <taskdef> calls just reuse this classloader by using the standard ‘loaderref’ parameter. You can use the same technique to load additional AntXtras-based extensions like Svn4Ant or Log4Ant.

1: <taskdef resource="org/jwaresoftware/antxtras/install/antlib.xml"
2:     classpathref="jwtools.path" loaderref="jwtools.classloader"/>
3:
4: <taskdef resource="org/jwaresoftware/antxtras/install/antlib-advanced.xml"
5:     loaderref="jwtools.classloader"/>
3. Getting AntXtras version information

Verify you can access AntXtras components from your Ant script by using the <vendorinfo> task to get the antlib’s version information.

1: <target name="about-antxtras">
2:   <vendorinfo name="antxtras"/>
3:   <echo level="info" message="RELEASE: ${antxtras.build.label}"/>
4: </target>


Linking to Custom Namespace

We recommend you put the foundation AntXtras components into the default Ant namespace (the ‘empty’ namespace that requires no prefix) as it lets you integrate the varied AntXtras components seamlessly with standard Ant components. However, it’s simple to allocate AntXtras to its own namespace if you want. The recommended namespace URI and prefix for AntXtras Foundation is “jware.antxtras” and “oja:” respectively. This section shows you how to setup such a configuration in your Ant script.

1. Defining AntXtras XML namespace

Define the namespace prefix for the AntXtras antlib as part of your main script’s root <project> XML element. By default, we use the “oja:” prefix for the “jware.antxtras” namespace to refer to AntXtras Foundation components.

1: <project name="antxtras:check" basedir="." xmlns:oja="jware.antxtras">
2. Defining path to AntXtras

Define where you’ve installed AntXtras using Ant’s <path> components. See the step 2 from either the “Loading Advanced Antlibs” or “Loading AntXtras Antlib” sections above. Let’s assume we're loading just the core antlib.

1: <dirname property="root.d" file="${basedir}"/>
2: <path id="jwtools.path">
3:   <fileset dir="${root.d}/lib">
4:     <include name="jw-antxtras.jar"/>
5:   </fileset>
6: </path>
3. Loading AntXtras into Ant

Load the AntXtras antlib into your Ant build scripts using the path we defined in step 2. Note that we specify the URI of our declared “oja” namespace using the <taskdef>’s uri parameter.

1: <taskdef uri="jware.antxtras"
2:       resource="org/jwaresoftware/antxtras/install/antlib.xml"
3:       classpathref="jwtools.path"/>
4. Getting AntXtras version information

Verify you can access AntXtras components from your Ant script by using the <oja:vendorinfo> task to get the antlib’s version information.

1: <target name="about-antxtras">
2:   <oja:vendorinfo name="antxtras"/>
3:   <echo level="info" message="RELEASE: ${antxtras.build.label}"/>
4: </target>


Compiling AntXtras

8-O If you would like to compile the source distribution, AntXtras is dependent on a few other open-source products that you must download and install before trying to compile your own AntXtras binaries. If you want to compile and run the AntXtras programmer tests you will need to download the third-party distributions that contains test support files, typically the source distributions.

Main Dependencies:

For Programmer Tests:

As Maven2 POM:

Compiling AntXtras source is straightforward from any IDE. The AntXtras source distribution also includes an ez-build.xml Ant script in the /etc directory that can generate a complete release (antlibs, javadocs, sources). You can update the ez-build.properties file with details from your environment before doing the Ant build. Read the ez-build-README file for details.


Navigation
Personal Tools