Ant-contrib.unkrig.de

From unkrig.de
Revision as of 10:50, 19 February 2014 by Aunkrig (talk | contribs) (→‎Abstract)
Jump to navigation Jump to search

Abstract

This library contributes useful tasks and types to APACHE ANT. It integrates seamlessly with other libraries like ant-contrib (which is not to be confused with this one).

Tasks

<follow>
Waits until a file grows.
<jsonProperty>
Parses a JSON document into a set of properties, in analogy with the standard ANT <xmlproperty> task.
<nslookup>
Resolves a host name or IP address.
<setAuthenticator>
Configures the authentication for all following java.net.URLConnections, including the <urlConnection> task.
<setCookieHandler>
Enables or disables cookie handling for Java's java.net.HttpURLConnection, including the <urlConnection> task.
<swingDialog>
Pops up a highly configurable dialog and invites the user to fill in form fields.
<urlConnection>
Connects to a resource and writes data to it and/or reads data from it.

Resource Collections

A resource collection represents a group of resources. A resource is an entity that has a name and a value. An often-used example of a resource collection is the <fileSet> type, where each resource is a file with its name and its contents.

<resourceCollectionDelta>
Selects the subset of resources that was added, deleted or modified since the last check.

Filter Readers

filter readers are an ANT concept that mimics the functionality of UNIX' pipes: A stream of bytes is read through a chain of filter readers, where each filter reader modifies the byte stream and/or performs some additional actions.

<progress>
Prints dots (".") to STDERR as data is read through it. This implements a kind of 'progress monitoring' for slow tasks that read some data.

Download and installation

The JAR file can be downloaded from http://ant-contrib.unkrig.de/download/.

To make the contributions available in your ANT scripts, write

<taskdef resource="de/unkrig/antcontrib/ant.xml" classpath="path/to/de.unkrig.ant-contrib.jar" />

, or, if you put the JAR file on ANT's default classpath, just

<taskdef resource="de/unkrig/antcontrib/ant.xml" />

Source code

The source code is available in the SUBVERSION repository. The repository URL is

https://svn.code.sf.net/p/loggifier/code

License

ANT-CONTRIB is published under the "New BSD License".