Ant-contrib.unkrig.de: Difference between revisions

From unkrig.de
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
This library contributes useful tasks and types to [http://ant.apache.org APACHE ANT]. It integrates seamlessly with other libraries like [http://ant-contrib.sourceforge.net/ ant-contrib] (which is not to be confused with this one).
<meta name="keywords" content="apache, ant, antlib, library, extension, tasks, types, filters"></meta>
<meta name="description" content="A library for APACHE ANT that contributes many useful, resource collections, and other types"></meta>
This project was renamed to "[[Antology]]" to get rid of the constant confusion with the (related, but otherwise independent) "[http://ant-contrib.sourceforge.net/ ant-contrib]" project on SOURCEFORGE.


== Tasks ==
As a consequence, in all your ANT build scripts, you have to change


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


: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/break.html            <code><break></code>]
to
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/continue.html        <code><continue></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/follow.html          <code><follow></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/forEach2.html        <code><forEach2></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/ftp2.html            <code><ftp2></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/jsonProperty.html    <code><jsonProperty></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/log.html              <code><log></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/logging.html          <code><logging></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/nslookup.html        <code><nslookup></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/retry.html            <code><retry2></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/setAuthenticator.html <code><setAuthenticator></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/setCookieHandler.html <code><setCookieHandler></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/simpleLogging.html    <code><simpleLogging></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/swingDialog.html      <code><swingDialog></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/throughput.html      <code><throughput></code>]
: [http://ant-contrib.unkrig.de/antdoc/index.html?tasks/urlConnection.html    <code><urlConnection></code>]


=== By Function Group ===
  <taskdef resource="de/unkrig/antology/ant.xml" classpath="path/to/antology-x.y.z-jar-with-dependencies.jar" />


==== Control Flow Tasks ====
. That's all, folks!
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/break.html <code><break></code>]
:Terminates the execution of the enclosing <code><forEach2></code> task.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/continue.html <code><continue></code>]
:Causes the enclosing <code><forEach2></code> task to continue with the next iteration element.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/follow.html <code><follow></code>]
:Waits until a file grows.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/forEach2.html <code><forEach2></code>]
:An enhanced version of [http://ant-contrib.sourceforge.net/tasks/tasks/for.html the <code><for></code> task of ant-contrib.sourceforge.net].
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/retry.html <code><retry2></code>]
:An enhanced version of the standard [http://ant.apache.org/manual/Tasks/retry.html <code><retry></code>] task.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/throughput.html <code><throughput></code>]
:Measures expired time and calculates and displays throughput rates and estimated remaining times.
 
==== Text Processing Tasks ====
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/jsonProperty.html <code><jsonProperty></code>]
:Parses a JSON document into a set of properties, in analogy with [http://ant.apache.org/manual/Tasks/xmlproperty.html the standard ANT <code><xmlproperty></code> task].
 
==== Logging Tasks ====
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/log.html <code><log></code>]
:Logs one message through <code>java.util.logging</code>.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/logging.html <code><logging></code>]
:Configures one or more loggers of the <code>java.util.logging</code> logging component.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/simpleLogging.html <code><simpleLogging></code>]
:Configures the [http://commons.unkrig.de/javadoc/de/unkrig/commons/util/logging/SimpleLogging.html <code>de.unkrig.commons.util.logging.SimpleLogging</code>] facility.
 
==== Networking Tasks ====
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/nslookup.html <code><nslookup></code>]
:Resolves a host name or IP address.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/setAuthenticator.html <code><setAuthenticator></code>]
:Configures the authentication for all following [http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html <code>java.net.URLConnection</code>]s, including the <code><urlConnection></code> task.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/setCookieHandler.html <code><setCookieHandler></code>]
:Enables or disables cookie handling for Java's [http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html <code>java.net.HttpURLConnection</code>], including the <code><urlConnection></code> task.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/urlConnection.html <code><urlConnection></code>]
:Connects to a resource and writes data to it and/or reads data from it.
 
==== UI Tasks ====
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?tasks/swingDialog.html <code><swingDialog></code>]
:Pops up a highly configurable dialog and invites the user to fill in form fields.
 
== Resource Collections ==
 
A [http://ant.apache.org/manual/Types/resources.html#collection 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 <code><fileSet></code> type, where each resource is a file with its name and its contents.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?resourceCollections/literalResource.html <code><literalResource></code>]
:A read-only resource with a name and a literal value - configurable either through <code>value="..."</code> or nested text.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?resourceCollections/resourceCollectionDelta.html <code><resourceCollectionDelta></code>]
:Selects the subset of resources that was added, deleted or modified since the last check.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?resourceCollections/resourceNames.html <code><resourceNames></code>]
:Replaces the resources' values with their names.
 
== Chainable Readers ==
 
[http://ant.apache.org/manual/Types/filterchain.html 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.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?chainableReaders/progress.html <code><progress></code>]
:Prints dots (".") to STDERR as data is read through it. This implements a kind of 'progress monitoring' for slow tasks that read some data.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?chainableReaders/tee.html <code><tee></code>]
:Passes data through unmodified, and copies it to a second filter chain.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?chainableReaders/patch.html <code><patch></code>]
:Modifies the data by applying a patch file.
 
== Conditions ==
 
[http://ant.apache.org/manual/Tasks/conditions.html Conditions] are nested elements of the <code><condition></code>, <code><waitfor></code> and several other tasks.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?conditions/every.html <code><every></code>]
:Evaluates to <code>true</code> when it is evaluated for the <b>first time</b>, and when the last evaluation to <code>true</code> has been more than a configured interval ago.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?conditions/false.html <code><false></code>]
:Always evaluates to <code>false</code>.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?conditions/successful.html <code><successful></code>]
:Executes the tasks configured as subelements sequentially and evaluates to whether all subtasks have completed successfully.
 
;[http://ant-contrib.unkrig.de/antdoc/index.html?conditions/true.html <code><true></code>]
:Always evaluates to <code>true</code>.
 
== Download and installation ==
 
The JAR file can be downloaded from http://ant-contrib.unkrig.de/download/. A [http://ant-contrib.unkrig.de/changelog.txt change log] is also available.
 
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]]".

Latest revision as of 09:58, 17 November 2016

<meta name="keywords" content="apache, ant, antlib, library, extension, tasks, types, filters"></meta> <meta name="description" content="A library for APACHE ANT that contributes many useful, resource collections, and other types"></meta> This project was renamed to "Antology" to get rid of the constant confusion with the (related, but otherwise independent) "ant-contrib" project on SOURCEFORGE.

As a consequence, in all your ANT build scripts, you have to change

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

to

 <taskdef resource="de/unkrig/antology/ant.xml" classpath="path/to/antology-x.y.z-jar-with-dependencies.jar" />

. That's all, folks!