3.15.1.6. Schema Tool Ant Task
The schema tool task allows you to directly invoke the schema tool from within the Ant build process.
The task’s parameters correspond exactly to the long versions of the command-line arguments to the org.apache.openjpa.jdbc.schema.SchemaTool.
Following is an example of a build.xml target that invokes the schema tool:
Example 175. Invoking the Schema Tool from Ant
<target name="schema">
<!-- define the schematool task; this can be done at the top of -->
<!-- the build.xml file, so it will be available for all targets -->
<taskdef name="schematool" classname="org.apache.openjpa.jdbc.ant.SchemaToolTask"/>
<!-- add the schema components for all .schema files below the -->
<!-- current directory -->
<schematool action="add">
<fileset dir=".">
<include name="**/*.schema" />
</fileset>
</schematool>
</target>