Using the Integrated Ant Task

The Ibator plugin includes an integrated Ant task for running Ibator. This Ant task is different from the Ant task included in the basic Ibator 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 Ibator plug-in declares an Ant task for use within the Eclipse JRE. The task is called "ibator.generate". Here is en example Ant build file:

<project default="runIbator">
  <target name="runIbator">
    <eclipse.convertPath resourcepath="IbatorTest/src/config/ibatorConfig.xml"
                         property="thePath"/>
    <ibator.generate configfile="${thePath}" />
  </target>
</project>

This file uses the Eclipse supplied "eclipse.convertPath" task to calculate the actual path of the configuration file. Then we use the "ibator.generate" task to run Ibator. 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.

The integrated Ant task supports the following attributes:

Attribute Description
configfile This is the Ibator 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 Ibator. Any id specified in the list must exactly match the value of the id attribute of an <ibatorContext> configuration element. Only ids specified in this list will be active for this run of Ibator. 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 Ibator. 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 Ibator. If this attribute is not specified, then all tables will be active. Specify table names as:

table
schema.table
catalog..table
etc.