impex:exportschema

Full name:

org.kuali.maven.plugins:maven-impex-plugin:1.1.13:exportschema

Description:

Examines 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

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
artifactId String - The Maven artifactId. Included here as a simple property of the mojo itself to facilitate usage of BeanUtils.copyProperties() to copy properties between Mojo's and Ant tasks
Default value is: ${project.artifactId}.
User property is: artifactId.
forceMojoExecution boolean - Setting this parameter to true will force the execution of this mojo, even if it would get skipped usually.
Default value is: false.
User property is: forceMojoExecution.
includeVersionInComment boolean - By default the version of the maven plugin being used during the build will be included as part of a comment in the XML. Set this to false to prevent this. Useful if you are committing files to SCM and don't want a change in the version of the plugin to show up as a change to the data.
Default value is: true.
User property is: includeVersionInComment.
schemaXMLFile String - The file that the schema XML will get written to
Default value is: ${basedir}/src/main/impex/${project.artifactId}.xml.
User property is: schemaXMLFile.
url String - The connect URL of the database.
User property is: url.

Optional Parameters

Name Type Since Description
antCompatibilityMode boolean - If true, files will be exported in a format that the Ant impex tasks can understand
Default value is: false.
User property is: antCompatibilityMode.
comment String - Additional comment that gets placed into the generated XML document. Anything included here gets appended to the default value
Default value is: Auto-generated by the maven-impex-plugin v1.0.2

User property is: comment.
driver String - Database driver classname. This parameter is optional, as the correct JDBC driver to use is detected from the url in almost all cases (works for Oracle, MySQL, Derby, PostGresSQL, DB2, H2, HSQL, SQL Server). If a driver is explicitly supplied, it will be used in place of the JDBC driver the automatic detection logic would have chosen.
User property is: driver.
driverProperties Properties - Additional properties for the JDBC driver
encoding String - The encoding to use when reading/writing files. If not specified this defaults to the platform specific encoding of whatever machine the build is running on.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
excludes String - Comma separated list of regular expressions for tables to exclude from the export
User property is: excludes.
includes String - Comma separated list of regular expressions for tables to include in the export
User property is: includes.
password String - The password for the database user. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL
User property is: password.
processSequences boolean - Flag indicating whether or not sequences will be processed. Default is true
Default value is: true.
User property is: processSequences.
processTables boolean - Flag indicating whether or not tables will be processed. Default is true
Default value is: true.
User property is: processTables.
processViews boolean - Flag indicating whether or not views will be processed. Default is true
Default value is: true.
User property is: processViews.
schema String - The schema to export. This parameter is optional, as the schema to export is automatically derived from platform specific logic that converts the artifactId.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle, and ksembedded for MySQL If schema is supplied, the supplied value will be used instead of the value derived from the artifactId
User property is: schema.
skip boolean - When true, skip the execution of this mojo
Default value is: false.
startMavenLogger boolean - When true, redirect logging from Log4j and Jakarta Commons Logging to the Maven logging system
Default value is: true.
User property is: startMavenLogger.
targetDatabase String - The type of database we are targeting (eg oracle, mysql). This is optional if url is supplied as the database type will be automatically detected based on the url. If targetDatabase is explicitly supplied it will override the type selected by the automatic detection logic.
User property is: targetDatabase.
username String - The user name to connect to the database. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL
User property is: username.

Parameter Details

antCompatibilityMode:

If true, files will be exported in a format that the Ant impex tasks can understand
  • Type: boolean
  • Required: No
  • User Property: antCompatibilityMode
  • Default: false

artifactId:

The Maven artifactId. Included here as a simple property of the mojo itself to facilitate usage of BeanUtils.copyProperties() to copy properties between Mojo's and Ant tasks
  • Type: java.lang.String
  • Required: Yes
  • User Property: artifactId
  • Default: ${project.artifactId}

comment:

Additional comment that gets placed into the generated XML document. Anything included here gets appended to the default value
Default value is: Auto-generated by the maven-impex-plugin v1.0.2
  • Type: java.lang.String
  • Required: No
  • User Property: comment

driver:

Database driver classname. This parameter is optional, as the correct JDBC driver to use is detected from the url in almost all cases (works for Oracle, MySQL, Derby, PostGresSQL, DB2, H2, HSQL, SQL Server). If a driver is explicitly supplied, it will be used in place of the JDBC driver the automatic detection logic would have chosen.
  • Type: java.lang.String
  • Required: No
  • User Property: driver

driverProperties:

Additional properties for the JDBC driver
  • Type: java.util.Properties
  • Required: No

encoding:

The encoding to use when reading/writing files. If not specified this defaults to the platform specific encoding of whatever machine the build is running on.
  • Type: java.lang.String
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

excludes:

Comma separated list of regular expressions for tables to exclude from the export
  • Type: java.lang.String
  • Required: No
  • User Property: excludes

forceMojoExecution:

Setting this parameter to true will force the execution of this mojo, even if it would get skipped usually.
  • Type: boolean
  • Required: Yes
  • User Property: forceMojoExecution
  • Default: false

includeVersionInComment:

By default the version of the maven plugin being used during the build will be included as part of a comment in the XML. Set this to false to prevent this. Useful if you are committing files to SCM and don't want a change in the version of the plugin to show up as a change to the data.
  • Type: boolean
  • Required: Yes
  • User Property: includeVersionInComment
  • Default: true

includes:

Comma separated list of regular expressions for tables to include in the export
  • Type: java.lang.String
  • Required: No
  • User Property: includes

password:

The password for the database user. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL
  • Type: java.lang.String
  • Required: No
  • User Property: password

processSequences:

Flag indicating whether or not sequences will be processed. Default is true
  • Type: boolean
  • Required: No
  • User Property: processSequences
  • Default: true

processTables:

Flag indicating whether or not tables will be processed. Default is true
  • Type: boolean
  • Required: No
  • User Property: processTables
  • Default: true

processViews:

Flag indicating whether or not views will be processed. Default is true
  • Type: boolean
  • Required: No
  • User Property: processViews
  • Default: true

schema:

The schema to export. This parameter is optional, as the schema to export is automatically derived from platform specific logic that converts the artifactId.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle, and ksembedded for MySQL If schema is supplied, the supplied value will be used instead of the value derived from the artifactId
  • Type: java.lang.String
  • Required: No
  • User Property: schema

schemaXMLFile:

The file that the schema XML will get written to
  • Type: java.lang.String
  • Required: Yes
  • User Property: schemaXMLFile
  • Default: ${basedir}/src/main/impex/${project.artifactId}.xml

skip:

When true, skip the execution of this mojo
  • Type: boolean
  • Required: No
  • Default: false

startMavenLogger:

When true, redirect logging from Log4j and Jakarta Commons Logging to the Maven logging system
  • Type: boolean
  • Required: No
  • User Property: startMavenLogger
  • Default: true

targetDatabase:

The type of database we are targeting (eg oracle, mysql). This is optional if url is supplied as the database type will be automatically detected based on the url. If targetDatabase is explicitly supplied it will override the type selected by the automatic detection logic.
  • Type: java.lang.String
  • Required: No
  • User Property: targetDatabase

url:

The connect URL of the database.
  • Type: java.lang.String
  • Required: Yes
  • User Property: url

username:

The user name to connect to the database. If not specified this is automatically generated by platform specific logic for converting the artifact id.

For example:
ks-embedded-db becomes KSEMBEDDED for Oracle and ksembedded for MySQL
  • Type: java.lang.String
  • Required: No
  • User Property: username