Using the Integrated Ant Task

The Abator plugin includes an integrated Ant task for running Abator. This Ant task is different from the Ant task included in the basic Abator distribution in that it supports Java file merging, and is integrated with the eclipse user interface, logging system, and progress notification system.

It is useful to use the integrated Ant task in the following situations:

Integrated Ant Task Detail

The Abator plug-in declares an Ant task for use within the Eclipse JRE. The task is called "abator.generate". Here is en example Ant build file:

<project default="runAbator">
  <target name="runAbator">
    <eclipse.convertPath resourcepath="AbatorTest/src/config/abatorConfig.xml"
                         property="thePath"/>
    <eclipse.convertPath resourcepath="AbatorTest/lib/hsqldb.jar"
                         property="jdbc.driver.jar"/>
    <abator.generate configfile="${thePath}" >
      <propertyset>
        <propertyref name="jdbc.driver.jar"/>
      </propertyset>
    </abator.generate>
  </target>
</project>

This file uses the Eclipse supplied "eclipse.convertPath" task to calculate the actual path of the configuration file and the JDBC driver. Then we use the "abator.generate" task to run Abator. When running this from Eclipse interactively, the Ant launch must be setup to run in the same JRE as the workspace. This setting is a standard configuration setting for running Ant in Eclipse.

The task supports an optional nested <propertyset> element which is the standard Ant property set type. This can be used to pass parameters into a configuration file. For example, the above property jdbc.driver.jar can be accessed in the Abator configuration file with the escape sequence ${jdbc.driver.jar}

The integrated Ant task supports the following attributes:

Attribute Description
configfile This is the Abator configuration file to use. Use the "eclipse.convertPath" task to convert a workspace path to an absolute path before setting this attribute (as shown above)

This attribute is required.

contextIds If specified, then this is a comma delimited list of contexts to use in the current run of Abator. Any id specified in the list must exactly match the value of the id attribute of an <abatorContext> configuration element. Only ids specified in this list will be active for this run of Abator. If this attribute is not specified, then all contexts will be active.
fullyQualifiedTableNames If specified, then this is a comma delimited list of tables to use in the current run of Abator. Any table specified in the list must exactly match the fully qualified table name specified in a <table> configuration element. Only tables specified in this list will be active for this run of Abator. If this attribute is not specified, then all tables will be active. Specify table names as:

table
schema.table
catalog..table
etc.