Description

This page is in construction


This is a task that can be used to generate a java resourcebundle source file for each properties file found in a directory.

See the RbGenerator documention page.

Parameters

See also the common attributes page.

Attribute Description Required
genRootdir The root directory where java resourcebundle files will be generated. Yes

Nested Elements

See the common nested elements page.

Examples

Run RbGenerator on all properties files of the root directory (properties extension), display errors and fail on errors.

<rbgenerator root="myproject/src" genRootdir="myproject/generated-sources/rbgenerator">

Run RbGenerator on all properties files of the root directory (myrb extension), display errors on console, create xml audit file, and fail on errors and set a project property.

<rbgenerator root="myproject/src" genRootdir="myproject/generated-sources/rbgenerator"
           extension="myrb"
           failureProperty="rbgeneratorProperty">
    <logger type="plain"/>
    <logger type="xml" outputfile="rbgenerator_report.xml"/>
</rbgenerator>

Run RbGenerator on files found in the filset, display errors on console, create xml audit file, maximum errors number tolerated is 5 and fail on errors.
Remember that all files in the fileset must be in the root directory in order package name resolution works. This is why we use an Ant property here.

<property name="root.dir" location="myproject/src">

<rbgenerator root="${root.dir}" genRootdir="myproject/generated-sources/rbgenerator" maxErrors="5">
    <logger type="plain"/>
    <logger type="xml" outputfile="rbgenerator_report.xml"/>
    <fileset dir="${root.dir}">
        <include name="**/*.properties"/>
    </fileset>
</rbgenerator>

Generate a html report after RbGenerator processing.

<xslt in="rbgenerator_report.xml"
      out="rbgenerator_report.html"
      style="rbgenerator-errors.xsl"/>