Fork me on GitHub

dbunit:operation

Full name:

org.codehaus.mojo:dbunit-maven-plugin:1.0-SNAPSHOT:operation

Description:

Execute DbUnit's Database Operation with an external dataset file.

Attributes:

  • Requires a Maven 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.
User property is: driver.
format String - Dataset file format type. Valid types are: flat, xml, csv, and dtd
Default value is: xml.
User property is: format.
type String - Type of Database operation to perform. Supported types are UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT
User property is: type.
url String - The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.

Optional Parameters

Name Type Since Description
caseSensitiveTableNames boolean - Be case sensitive when handling tables.
Default value is: false.
dataTypeFactoryName String - Set the DataType factory to add support for non-standard database vendor data types.
Default value is: org.dbunit.dataset.datatype.DefaultDataTypeFactory.
User property is: dataTypeFactoryName.
datatypeWarning boolean - Enable or disable the warning message displayed when DbUnit encounter an unsupported data type.
Default value is: false.
User property is: datatypeWarning.
escapePattern String - escapePattern
User property is: escapePattern.
metadataHandlerName String 1.0-beta-3 Class name of metadata handler.
Default value is: org.dbunit.database.DefaultMetadataHandler.
User property is: metadataHandlerName.
password String - Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key
User property is: password.
schema String - The schema name that tables can be found under.
User property is: schema.
settingsKey String - Server's id in settings.xml to look up username and password. Default to ${url} if not given.
User property is: settingsKey.
skip boolean - Skip the execution when true, very handy when using together with maven.test.skip.
Default value is: false.
User property is: skip.
skipOracleRecycleBinTables boolean 1.0-beta-2 skipOracleRecycleBinTables
Default value is: false.
User property is: escapePattern.
sources File[] - DataSet files.
src File - Deprecated. 1.0
User property is: src.
supportBatchStatement boolean - Enable or disable usage of JDBC batched statement by DbUnit
Default value is: false.
User property is: supportBatchStatement.
transaction boolean - When true, place the entired operation in one transaction
Default value is: false.
User property is: transaction.
useQualifiedTableNames boolean - Enable or disable multiple schemas support by prefixing table names with the schema name.
Default value is: false.
User property is: useQualifiedTableNames.
username String - Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key
User property is: username.

Parameter Details

caseSensitiveTableNames:

Be case sensitive when handling tables.
  • Type: boolean
  • Required: No
  • Default: false

dataTypeFactoryName:

Set the DataType factory to add support for non-standard database vendor data types.
  • Type: java.lang.String
  • Required: No
  • User Property: 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
  • User Property: datatypeWarning
  • Default: false

driver:

The class name of the JDBC driver to be used.
  • Type: java.lang.String
  • Required: Yes
  • User Property: driver

escapePattern:

escapePattern
  • Type: java.lang.String
  • Required: No
  • User Property: escapePattern

format:

Dataset file format type. Valid types are: flat, xml, csv, and dtd
  • Type: java.lang.String
  • Required: Yes
  • User Property: format
  • Default: xml

metadataHandlerName:

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

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
  • User Property: password

schema:

The schema name that tables can be found under.
  • Type: java.lang.String
  • Required: No
  • User Property: 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
  • User Property: settingsKey

skip:

Skip the execution when true, very handy when using together with maven.test.skip.
  • Type: boolean
  • Required: No
  • User Property: skip
  • Default: false

skipOracleRecycleBinTables:

skipOracleRecycleBinTables
  • Type: boolean
  • Since: 1.0-beta-2
  • Required: No
  • User Property: escapePattern
  • Default: false

sources:

DataSet files.
  • Type: java.io.File[]
  • Required: No

src:

Deprecated. 1.0
DataSet file Please use sources instead.
  • Type: java.io.File
  • Required: No
  • User Property: src

supportBatchStatement:

Enable or disable usage of JDBC batched statement by DbUnit
  • Type: boolean
  • Required: No
  • User Property: supportBatchStatement
  • Default: false

transaction:

When true, place the entired operation in one transaction
  • Type: boolean
  • Required: No
  • User Property: transaction
  • Default: false

type:

Type of Database operation to perform. Supported types are UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT
  • Type: java.lang.String
  • Required: Yes
  • User Property: type

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
  • User Property: 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
  • User Property: username