dbunit:export

Full name:

org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-3:export

Description:

Execute DbUnit Export operation

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.

Required Parameters

Name Type Since Description
driver String - The class name of the JDBC driver to be used.
url String - The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.

Optional Parameters

Name Type Since Description
dataTypeFactoryName String - Set the DataType factory to add support for non-standard database vendor data types.
Default value is: org.dbunit.dataset.datatype.DefaultDataTypeFactory.
datatypeWarning boolean - Enable or disable the warning message displayed when DbUnit encounter an unsupported data type.
Default value is: false.
dest File - Location of exported DataSet file
Default value is: ${project.build.directory}/dbunit/export.xml.
doctype String - doctype
encoding String - Encoding of exported data.
Default value is: ${project.build.sourceEncoding}.
escapePattern String - escapePattern
format String - DataSet file format
Default value is: xml.
metadataHandlerName String 1.0-beta-3 Class name of metadata handler.
Default value is: org.dbunit.database.DefaultMetadataHandler.
ordered boolean - Set to true to order exported data according to integrity constraints defined in DB.
password String - Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key
queries Query[] - List of DbUnit's Query. See DbUnit's JavaDoc for details
schema String - The schema name that tables can be found under.
settingsKey String - Server's id in settings.xml to look up username and password. Default to ${url} if not given.
skip boolean - Skip the execution when true, very handy when using together with maven.test.skip.
Default value is: false.
skipOracleRecycleBinTables boolean 1.0-beta-2 skipOracleRecycleBinTables
Default value is: false.
supportBatchStatement boolean - Enable or disable usage of JDBC batched statement by DbUnit
Default value is: false.
tables Table[] - List of DbUnit's Table. See DbUnit's JavaDoc for details
useQualifiedTableNames boolean - Enable or disable multiple schemas support by prefixing table names with the schema name.
Default value is: false.
username String - Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key

Parameter Details

dataTypeFactoryName:

Set the DataType factory to add support for non-standard database vendor data types.
  • Type: java.lang.String
  • Required: No
  • Expression: ${dataTypeFactoryName}
  • Default: org.dbunit.dataset.datatype.DefaultDataTypeFactory

datatypeWarning:

Enable or disable the warning message displayed when DbUnit encounter an unsupported data type.
  • Type: boolean
  • Required: No
  • Expression: ${datatypeWarning}
  • Default: false

dest:

Location of exported DataSet file
  • Type: java.io.File
  • Required: No
  • Expression: ${dest}
  • Default: ${project.build.directory}/dbunit/export.xml

doctype:

doctype
  • Type: java.lang.String
  • Required: No
  • Expression: ${doctype}

driver:

The class name of the JDBC driver to be used.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${driver}

encoding:

Encoding of exported data.
  • Type: java.lang.String
  • Required: No
  • Expression: ${encoding}
  • Default: ${project.build.sourceEncoding}

escapePattern:

escapePattern
  • Type: java.lang.String
  • Required: No
  • Expression: ${escapePattern}

format:

DataSet file format
  • Type: java.lang.String
  • Required: No
  • Expression: ${format}
  • Default: xml

metadataHandlerName:

Class name of metadata handler.
  • Type: java.lang.String
  • Since: 1.0-beta-3
  • Required: No
  • Expression: ${metadataHandlerName}
  • Default: org.dbunit.database.DefaultMetadataHandler

ordered:

Set to true to order exported data according to integrity constraints defined in DB.
  • Type: boolean
  • Required: No

password:

Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key
  • Type: java.lang.String
  • Required: No
  • Expression: ${password}

queries:

List of DbUnit's Query. See DbUnit's JavaDoc for details
  • Type: org.dbunit.ant.Query[]
  • Required: No

schema:

The schema name that tables can be found under.
  • Type: java.lang.String
  • Required: No
  • Expression: ${schema}

settingsKey:

Server's id in settings.xml to look up username and password. Default to ${url} if not given.
  • Type: java.lang.String
  • Required: No
  • Expression: ${settingsKey}

skip:

Skip the execution when true, very handy when using together with maven.test.skip.
  • Type: boolean
  • Required: No
  • Expression: ${skip}
  • Default: false

skipOracleRecycleBinTables:

skipOracleRecycleBinTables
  • Type: boolean
  • Since: 1.0-beta-2
  • Required: No
  • Expression: ${escapePattern}
  • Default: false

supportBatchStatement:

Enable or disable usage of JDBC batched statement by DbUnit
  • Type: boolean
  • Required: No
  • Expression: ${supportBatchStatement}
  • Default: false

tables:

List of DbUnit's Table. See DbUnit's JavaDoc for details
  • Type: org.dbunit.ant.Table[]
  • Required: No

url:

The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.
  • Type: java.lang.String
  • Required: Yes

useQualifiedTableNames:

Enable or disable multiple schemas support by prefixing table names with the schema name.
  • Type: boolean
  • Required: No
  • Expression: ${useQualifiedTableNames}
  • Default: false

username:

Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key
  • Type: java.lang.String
  • Required: No
  • Expression: ${username}