Fikin Ant Tasks

Fikin Ant Tasks

This is a collection of various in its purpose Apache Ant tasks and supporting libraries (which can be used stand alone too). They were developed mainly to address missing so far functionality in open source world.
My Mug

All source code is released under : Apache License V2
Latest release and changes : WHATSNEW
Installation instructions : INSTALL

If you feel generous, donate and be honored forever : Donate
If you feel like business, sign up a maintenance contract and be privileged : Sign-Up
If you feel cool, buy a t-shirt and make a statement : T-shirt
If you feel like hacking, send me a patch : Submit patch
If you feel nothing like it don't panic, drink water and hangover will soon be over

Doclet library:
VelocityDoclet JavaDoc and Jakarta Velocity engine.
The fastest and simplest way to generate output from Java sources.
Simply create a Velocity template for desired output and run a javadoc with your sources.
AbstractDoclet An improved JavaDoc Doclet class used to simplify Doclet programing. It enforces object inheritance as much as Sun's Doclet API allows this.
It features method strategies (template methods) for command line parameters definition and processing and RootDoc processing.
It requires Apache Logging (and Log4J) and Velocity.

Doclet related tasks:
velocityDoclet Ant Task for running VelocityDoclet with user provided Velocity template.
antTasksPropertiesDoclet Ant Task generating ant.properties file in format taskName=fqClassName
It recognizes all public, not abstract java classes, descendant of Ant Task and having @ant-task javadoc tag in the class comment.
antTasksAntlibDoclet Ant Task generating antlib.xml file, featuring same type of classes as in previous task, but the file format is Antlib.
antTasksDocHtmlDoclet Ant Task generating single html page with documentation of the Ant Tasks found in the source. Recognizes same classes as previous two tasks.
antTasksDocTextDoclet Essentially same Ant Task as previous one but generating a text file.
doclet Ant task tailored for JavaDoc Doclet usage, think of it as simplified javadoc task

XML tasks:
xslt2 An improved style/xslt Ant Task.
It adds support for <param location=""/> which results in parameter value of format URL (needed Xalan for params representing files). Out-file dependency tracking is added for those params.
It also adds <depend location="" /> which is used in conjunction with in/style to track file-dependencies.
stx Same as xslt2 but operating STX transformations instead.
xpath Perform multiple XPath expressions against input XML or HTML document and store the result into a file or project property

XML library:
Xslt Using XSLT as simple as it can get. This class is based on JAXP interfaces and tailored to simplify their usage to maximum.
It provides factory methods for instantiation of xst and input xmlstreamsout of classpath (besides all the rest).
It provides with ability to safely register callback objects viaXalan/Saxon java extensions.
And these objects are fully reusable (i.e. based on JAXP Templates).
Stx Class offering same services as Xslt but operating with STX (streaming transformation for xml, this is a counter pair to XSLT, tailored for fast, low memory footprint SAX-based transformations).
TemplateEngine A simplistic template engine, able to process input XML document and for each tag (from predefined namsepace) execute a corresponding method in a given lookup POJO
It requires Apache Logging (and Log4J). STX requires Joost too.

Protocol handler (java net url):
"classpath" URL handler URL handler implementation recognizing "classpath://" protocol. It resolves to predefined list of classloaders, used to locate the resource.

EmbeddedAntProject This is a wrapper on top of Ant Project which is tailored at embedding into your own classes.
Typical problems tackled by this class are: proper instantiation of Ant projects based on build.xml (can be located in classpath as well), logging to stdout/stderr is taken care of in application friendly way (i.e. do not alter current log objects), it allows easy target execution and finally, it allows for easy tasks creation.

Ant tasks for Jakarta's HttpClient library
httpoptions This and following tasks are created after Ant Post but these are based on Jakarta HttpClient library.
One of the main features compared to Ant's <post> task is the ability to POST multi-part messages and to use cookies for servers where for example users are required to authenticate.
This task perform HTTP OPTIONS method.
httphead This task perform HTTPHEAD method.
httpget This task perform HTTPGET method.
httpdelete This task perform HTTPDELETE method.
httptrace This task perform HTTPTRACE method.
httppost This task perform HTTPPOST method.
httpput This task perform HTTPPUT method.
httpmpost This task perform multipart message HTTP POST method.
It requires Apache HttpClient

Ant tasks for automated release and file publishing to SF.NET
net/sf/fikin/ant/sf/antlib.xml This build file contains the macrodefs for automating release and file management in SF.NET with Ant. The implementation is based on <xpath>, <httppost>, <httpget> tasks as well as Ant Contribs.
Input release data (release info and files) is provided by a file like release.xml
I'm executing it the following way:
./ant.sh -Dsf.user=... -Dsf.pswd=... -DreleaseFile=release.xml distro sf-publish-release
It requires Apache BSF, Mozilla Rhino JS and AntContribs

Ant tasks for automated OpenSSH and Java Keystore certificates management
net/sf/fikin/ant/cert/antlib.xml This Antlib file contains the macrodefs for automating:
  • Issuing new certificates with OpenSSH
  • Certificates signing with OpenSSH
  • OpenSSH stores creation
  • Conversion between various file format
  • Import and export functionality for Java Keystores
Typical usage is presented at test build file and build properties.
It requires Apache BSF, Mozilla Rhino JS and AntContribs


©2006-2007 Nikolay Fiykov SourceForge