Plugin Documentation

Goals available for this plugin:

GoalDescription
impex:createAuthenticates to a database server using credentials with DBA authority and creates an empty database along with a default user for accessing the newly created database. See also impex:drop
impex:datadtdGenerates a DTD for the database tables from a schema XML file
impex:datasqlGenerates platform specific SQL from database agnostic XML files. Each SQL file created by this goal contains data for a single table. The database platform to generate SQL for is determined by ${targetDatabase}. See also impex:schemasql
impex:dropAuthenticates to a database server using credentials with DBA authority and drops a database along with the default user that was created for accessing that database. See also impex:create
impex:exportdataReads the content of tables from a database and exports the data in a database agnostic format to XML files.
impex:exportschemaExamines the JDBC metadata of a proprietary database and exports the schema information to database agnostic XML. The generated XML contains information about tables, primary keys, unique constraints, foreign keys, indexes, sequences, and views. This goal does not export any data. See also impex:exportdata and impex:import
impex:generatetablelistingExamine the directory that SQL files were generated to and produce a file that contains a listing of any tables that contained data at the point in time the export was run.
impex:id-invalid-data-filesThis mojo identifies data files that are present on the file system but are not present in schema.xml. This can happen if a table is removed from the schema. It sets a project property called "impex.data.invalid". This property is a comma delimited list of filenames that have no match in the db schema. If it finds any invalid files it will also set the project property "impex.found.invalid=true"
impex:importExecutes SQL for creating tables, primary keys, constraints, indexes, relationships, and views inside a database. Also populates the tables with a default set of data.
impex:morphdataConverts Ant impex data XML files into maven-impex-plugin data XML files
impex:morphschemaConvert an Ant impex schema XML file into a maven-impex-plugin schema XML file
impex:morphversiontableMorph the xml inside KS_DB_VERSION.xml so it has Maven friendly placeholders for version info
impex:resetDoes a DROP->CREATE of a database and the corresponding default user. See also impex:create and impex:drop
impex:schemasqlGenerates platform specific SQL from database agnostic XML files.

There are two types of SQL files created by this goal:

Type 1: DDL statements for creating tables, primary keys, indexes, and unique constraints. Does not contain DDL for enforcing relationships between tables.
Type 2: DDL statements for creating and enforcing relationships between tables

This allows data to be imported into multiple tables concurrently. Running the first type of SQL file will create the empty tables without any foreign key constraints. Data can then be loaded concurrently into the tables (using optimized high speed tools if desired) without needing to worry about the order in which the tables are loaded. After data has been loaded, the second type of SQL file can be run to add the relationships between the tables. As long as the data set is consistent and correct, all the relationships will get created correctly.

The database platform to generate SQL for is determined by ${targetDatabase}. See also impex:datasql

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.6
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>maven-impex-plugin</artifactId>
          <version>1.1.2-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>maven-impex-plugin</artifactId>
        <version>1.1.2-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"