Downloads

   Like most Ant extensions, the JWare/AntXtras PEd4Ant package (PEd4Ant) is a Java-based library. The release consists of three independent components: antlibs, documents, and source. You can download only the most recent release from this website; for older releases, visit the PEd4Ant files release archive.

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

The current release has been verified against the Windows Sun J2SE 1.4 and J2SE 1.5 platforms, the Ant 1.7.0 distribution, and the AntXtras v2 series distributions.

Package Type v1 Series Package Zipped
Binaries ped4ant_1.0.0b1_bin.zip (sha1)
Binaries with Dependencies ped4ant_1.0.0b1_bin_withdeps.zip (sha1)
Documents ped4ant_1.0.0b1_doc.zip (sha1)
Sources ped4ant_1.0.0b1_src.zip (sha1)


If you do not download the “_withdeps” package, PEd4Ant has the following non-Ant runtime dependencies:


Installing PEd4Ant

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

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

  2. Download, verify, and install a PEd4Ant distribution. We suggest you download the binary distribution that already includes the third-party libraries that PEd4Ant requires (this is the “_withdeps” distribution). In the remaining steps we will use <PED4ANT_DIR> to refer to the directory into which the PEd4Ant distribution was extracted or built.
    • 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.

  3. Update your Ant runtime environment to include the PEd4Ant jar file <PED4ANT_DIR>/lib/jw-ped4ant.jar and all required third-party jars 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 PEd4Ant in its own location and update the CLASSPATH used when you run Ant (for example, by using the -lib option or a custom $HOME/.antrc file). See “Running Ant” for details.

  4. Verify the PEd4Ant tasks are accessible from Ant. The easiest way to do this is to run Ant against this starter build script. This build script doesn’t actually do anything except load the PEd4Ant antlib and print out its version information. If Ant is unable to locate the PEd4Ant library or its dependencies, even this simple script will fail.

  5. Read the Overview page to get an idea of how to use PEd4Ant.

  6. Start using PEd4Ant!


Loading PEd4Ant Antlib

Below are the steps you must follow to use PEd4Ant after you download and expand the PEd4Ant ‘_withdeps’ (with dependencies) distribution. The examples assume you run the Ant scripts from inside the etc directory of the distribution.

1. Defining PEd4Ant XML namespace

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

1: <project name="ped4ant:check" basedir="." xmlns:ped="jware.ped4ant">
2. Defining path to PEd4Ant and its dependencies

Define where you’ve installed PEd4Ant using Ant’s <path> components. In this snippet we assume ‘${PED4ANT_HOME}’ is where you have installed the PEd4Ant distribution.

1: <dirname property="PED4ANT_HOME" file="${basedir}"/>
2:
3: <path id="jwtools.path">
4:   <fileset dir="${PED4ANT_HOME}">
5:     <include name="dep/*/lib/*.jar"/>
6:     <include name="lib/*.jar"/>
7:   </fileset>
8: </path>
3. Loading AntXtras and PEd4Ant antlibs into Ant

Load the AntXtras and PEd4Ant antlibs into your Ant build scripts using the path we defined in step 2. Note that we specify the URI of our declared “ped” namespace using the <taskdef>’s uri parameter and we load the AntXtras components into the default Ant namespace. (You don’t have to load the AntXtras antlib if you don’t need those components!)

1: <taskdef resource="org/jwaresoftware/antxtras/install/antlib.xml"
2:       classpathref="jwtools.path" loaderref="jwtools.classloader"/>
3:
4: <taskdef uri="jware.ped4ant"
5:       resource="org/jwaresoftware/ped4ant/antlib-ns.xml"
6:       loaderref="jwtools.classloader"/>
4. Getting PEd4Ant version information

Verify you can access PEd4Ant components from your Ant build script. Here we use the AntXtras <vendorinfo> task to load the build information for PEd4Ant and also try to create an empty in-memory Properties object.

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

Compiling PEd4Ant

8-O If you would like to compile the source distribution, PEd4Ant is dependent on a few other open-source offerings that you must download and install before trying to compile your own PEd4Ant binaries. If you want to compile and run PEd4Ant programmer tests you need to download the distributions that contain test support files, typically the source distributions; otherwise, the binary distributions are fine.

Main Dependencies:

For Programmer Tests:

As Maven2 POM:

You can compile the PEd4Ant sources from any Java IDE. The PEd4Ant source distribution also contains an ez-build.xml Ant script in the /etc directory that can generate the basic antlib, javadocs, and source package. You must 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