|Getting started > How to run it? > The Integration into Ant > The Jacson Ant Task||2005-10-04 00:11:20 v0.90|
|Jacson, say Jackson, think J-Scan|
|Download Jacson | Sourceforge Project Summary | Jacson Home | SourceForge Home|
What is Jacson?
How to install?
How to run it?
The Integration into Ant
The Jacson Ant Task
Embed in a Java Program
How it works?
How to Contribute?
Process a set of documents with the Jacson engine.
This tasks depends on jar files not included in
Ant distribution. You need at least
<taskdef name="jacson" classname="de.spieleck.app.jacson.ant.JacsonTask"/>You might use optional classpath attributes or elements to load Jacson from a special classpath.
Below documentation (as well as the task itself) contains quoted material from the Ant Core task Style.
It is possible to refine the set of files that are being processed. This can be done with the includes, includesfile, excludes, excludesfile and defaultexcludes attributes. With the includes or includesfile attribute you specify the files you want to have included by using patterns. The exclude or excludesfile attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the defaultexcludes attribute, you can specify whether you want to use default exclusions or not. See the section on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.
This task forms an implicit FileSet and supports all attributes of <fileset> (dir becomes basedir) as well as the nested <include>, <exclude> and <patternset> elements.
This task is aware of the surrounding Ant environment: Ant properties are mapped into <se:param/> parameters in the Jacson configuration. An <se:param/> in a Jacson configuration will actually create the corresponding property in the Ant project. This task supports the use of nested <param/> elements which set values in an <se:param/> declaration. <param/> elements override values of properties with the same name and disable Jacson from overriding the corresponding property in the Ant project.
JacsonTask is a subclass of Ant's MatchingTask and can work on complex filesets. These should be described elsewhere in the Ant documentation.
Nested Elementsdirectory based
Param is used to pass a <se:param/> parameters to the Jacson configuration.
This example uses the Jacson configuration
<target name="topfilter"> <jacson config="head.conf" out="topfilter.properties" in="data/access.log.gz" /> </target>If
This uses the
<target name="demo1" depends="taskdemo-prepare"> <jacson config="loganalysis.conf"> <include name="logfiles/**"/> </jacson> </target>Since no <out> is specified the output files are controlled by the configuration. It might still be controlled by Ant properties which map to parameters in the configuration.