Package org.jcoderz.commons.taskdefs

This package contains Ant tasks that can be used by any jCoderZ Java project.

See:
          Description

Class Summary
AntTaskUtil Provides utility functions for Ant task.
ApiDocTask Generates API documentation (DocBook format).
AppInfoTask Ant task that reads the master app-info.xml file, expands the XInclude elements and writes the whole XML document to a file.
ConfigurationClassesGenerator Ant task that generates the configuration classes out of an XML document.
ConfigurationInitFileGenerator Ant task that generates the configuration initialization files out of an XML document.
ConfigurationTestGenerator Ant task that generates the configuration test cases out of an XML document.
ConfigurationValidatorGenerator Ant task that generates the configuration test cases out of an XML document.
DiagramTask Generates UML diagrams.
DotTask Ant task for the 'dot' command from the graphviz package.
DummyEntityResolver Dummy Entity Resolver.
ErrorCodeManual Ant task that generates docbook manual fragments covering the error codes for each service.
Formatter Abstract class that defines the interface of a DocBook renderer.
GnuplotTask Ant task for the 'gnuplot' command.
JsfConverterGenerator This taskdef is used to generate JSF converter classes, generated by the SimpleTypeGenerator.
LogMessageGenerator Ant task that generates classes out of the log message info XML document.
LogMessageGeneratorTest JUnit test for the Ant task LogMessageGenerator.
LuntBuildTask Ant task to trigger a build on the Luntbuild system and download results afterwards.
LuntBuildTask.Artifact Represents an artifact to retrieve.
MakeReadonlyBeans This task is used to modify a deployment descriptor, making a copy of the given entity beans with their name changed from FooEntity to FooReaderEntity.
SaxonTask Ant task wrapper for Saxon.
SimpleTypeGenerator Ant task that generates simple type classes out of an XML document.
SimpleTypeGeneratorTest JUnit test for the Ant task SimpleTypeGenerator.
SourceDirectory This class is used as sub-element for Ant tasks.
XepTask Ant task to run the xep (renderX) fo processor.
XpathPropertyTask This task allows to set a property based on an xpath expression, evaluated on a given xml file.
XsltBasedTask This class implements common functionality for XSLT based Ant tasks.
XsltBatchProcessor Ant task that performs XSL transformation for a set of input files.
XtremeDocs Xtreme Documentation Ant task.
XtremeDocs.FormatterInfoData The Class FormatterInfoData.
XtremeDocs.HibernateInfoData The Class HibernateInfoData.
 

Package org.jcoderz.commons.taskdefs Description

This package contains Ant tasks that can be used by any jCoderZ Java project.

Classes in this package are only allowed to have a dependency to the JDK, the org.jcoderz.commons and the org.jcoderz.commons.util package.package.

Log Message Generator

Process a XML document file that define the application's log messages and generate corresponding java typesafe enum classes. The classes are generated via XSLT and various stylesheets from the FawkeZ Java archive.

Note:The Xalan2 XSL processor is required for this task. If you are using JDK 1.4 or higher, this task does not require external libraries not supplied in the FawkeZ distribution.

This task doesn't support/require any nested elements.

Parameters

Attribute Description Required
destdir directory in which to store the results. Yes
in specifies a single XML document that contains the log message info. Yes
out specifies the output name for the log output. Yes
project specifies the project name. The project name defines the path in the XML document for the transformation. The project name can either be the name as defined in the XML document in the @name attribute or it can be set to the value as defined in the @short-name attribute. Yes
xsl specifies a XSL stylesheet that is used for transformation. No; default is to use the build-in stylesheet.
force Recreate target files, even if they are newer than their corresponding source files. No; default is false
failonerror Stop the buildprocess if the target fails with an error. No; default is false

Examples

      <taskdef name="log-message-generator"
               classname="org.jcoderz.commons.taskdefs.LogMessageGenerator">
         <classpath>
            <pathelement location="path/to/fawkez.jar"/>
         </classpath>
      </taskdef>
         
Add task definition to the current project.
      <log-message-generator
         in="${base.dir}/src/xml/log-message-info.xml"
         out="${build.dir}/log-message-info.xml.test.out"
         destDir="${build.dir}/foo"
         application="FawkeZ"
         failonerror="true"
         force="true"/>
         
Generates the log message info classes to the directory ${build.dir}/foo for the applicaton FawkeZ. The dependency check is omitted, since the force attribute is set to true. This target will fail if an error occurs.

Simple Types Generator

Process a XML document file that define simple types like type-safe enumerations or restricted strings and generate the java classes. The classes are generated via XSLT and various stylesheets from the FawkeZ Java archive.

Take the following XML document defines two simple-types:
<?xml version="1.0" encoding="UTF-8"?>

<simpleTypes>

<!-- ===============================================================
     TYPE-SAFE ENUMERATIONS
     =============================================================== -->
   <typeSafeEnumerations>
      <enumeration
         classname="Color"
         package="org.jcoderz.commons">
         <value>blue</value>
         <value>red</value>
         <value>yellow</value>
      </enumeration>
   </typeSafeEnumerations>

<!-- ===============================================================
     RESTRICTED STRINGS
     =============================================================== -->
   <restrictedStrings>
      <restrictedString
         classname="FooString"
         package="org.jcoderz.commons"
         min-length="1"
         max-length="10">
         <constant
            name="CONSTANT_VALUE"
            value="foo"
            comment="Additional Constant defined in the XML document."/>
      </restrictedString>
   </restrictedStrings>

<!-- ===============================================================
     REGEX STRINGS
     =============================================================== -->
   <regexStrings>
      <regexString
         classname="RegexString"
         package="org.jcoderz.commons">
         <regex>foo|bar|buz</regex>
      </regexString>
   </regexStrings>

</simpleTypes>
         

Note:The Xalan2 XSL processor is required for this task. If you are using JDK 1.4 or higher, this task does not require external libraries not supplied in the FawkeZ distribution.

This task doesn't support/require any nested elements.

Parameters

Attribute Description Required
destdir directory in which to store the results. Yes
in specifies a single XML document that contains the log message info. Yes
out specifies the output name for the log output. Yes
xsl specifies a XSL stylesheet that is used for transformation. No; default is to use the build-in stylesheet.
force Recreate target files, even if they are newer than their corresponding source files. No; default is false
failonerror Stop the buildprocess if the target fails with an error. No; default is false

Examples

      <taskdef name="simple-type-generator"
               classname="org.jcoderz.commons.taskdefs.SimpleTypeGenerator">
         <classpath>
            <pathelement location="path/to/fawkez.jar"/>
         </classpath>
      </taskdef>
         
Add task definition to the current project.
      <simple-type-generator
         in="${base.dir}/src/xml/simple-types.xml"
         out="${build.dir}/simply-types.out"
         destDir="${build.dir}/foo"
         failonerror="true"
         force="true"/>
         
Generates the simple type classes to the directory ${build.dir}/foo. The dependency check is omitted, since the force attribute is set to true. This target will fail if an error occurs.

Generator for Configuration Classes and Initialization Files

Process a XML document file that define the application's configuration entries and generate corresponding java classes or initialization files. The classes or files are generated via XSLT and various stylesheets from the FawkeZ Java archive.

Note:The Xalan2 XSL processor is required for this task. If you are using JDK 1.4 or higher, this task does not require external libraries not supplied in the FawkeZ distribution.

This task doesn't support/require any nested elements.

Parameters

Attribute Description Required
destdir directory in which to store the results. Note: This attribute is only supported by the configuration generator that produces the Java classes. Yes, for the configuration generator that produces the Java classes.
in specifies a single XML document that contains the log message info. Yes
out specifies the output name for the log output. Yes
project specifies the project name. The project name defines the path in the XML document for the transformation. The project name can either be the name as defined in the XML document in the @name attribute or it can be set to the value as defined in the @short-name attribute. Yes
groups specifies the group names. The group names are used to select the elements in the XML document for the transformation. The group names must be a non-empty list seperated by a whitespace of the @short-name attribute in the group element. Yes
mode specifies the initialization mode. Valid values are: properties or sql. Note: This attribute is only supported by the configuration generator that produces the initialization files. No; default is properties.
xsl specifies a XSL stylesheet that is used for transformation. No; default is to use the build-in stylesheet.
force Recreate target files, even if they are newer than their corresponding source files. No; default is false
failonerror Stop the buildprocess if the target fails with an error. No; default is false

Examples

      <taskdef name="config-classes-generator"
               classname="org.jcoderz.commons.taskdefs.ConfigurationClassesGenerator">
         <classpath>
            <pathelement location="path/to/fawkez.jar"/>
         </classpath>
      </taskdef>
         
Add task definition to the current project.
      <config-classes-generator
         in="${base.dir}/src/xml/app-info.xml"
         out="${build.dir}/app-info-config-classes.xml.out"
         destDir="${build.dir}/foo"
         application="FawkeZ"
         groups="SEC FOO BAR"
         failonerror="true"
         force="true"/>
         
Generates the configuration classes to the directory ${build.dir}/foo for the applicaton FawkeZ and the groups/services SEC, FOO and BAR. The dependency check is omitted, since the force attribute is set to true. This target will fail if an error occurs.
      <taskdef name="config-init-file-generator"
               classname="org.jcoderz.commons.taskdefs.ConfigurationInitFileGenerator">
         <classpath>
            <pathelement location="path/to/fawkez.jar"/>
         </classpath>
      </taskdef>
         
Add task definition to the current project.
      <config-init-file-generator
         in="${base.dir}/src/xml/app-info.xml"
         out="${build.dir}/configuration.properties"
         application="FawkeZ"
         groups="SEC FOO BAR"
         mode="SQL"
         failonerror="true"
         force="true"/>
         
Generates the configuration initialization property file ${build.dir}/configuration.properties for the applicaton FawkeZ and the groups/services SEC, FOO and BAR. The dependency check is omitted, since the force attribute is set to true. This target will fail if an error occurs.



Copyright 2007 The jCoderZ Project.