dbunit:operation

Full name:

org.dbunit:dbunit-maven-plugin:1.2.1-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.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 1.0.

Required Parameters

Name Type Since Description
<driver> String - The class name of the JDBC driver to be used.
User Property: driver
<format> String - Dataset file format type. Valid types are: flat, xml, csv, and dtd
Default: xml
User Property: 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: type
<url> String - The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.
User Property: url

Optional Parameters

Name Type Since Description
<caseSensitiveTableNames> boolean -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Be case sensitive when handling tables.
Default: false
<combine> boolean - When true, table rows from multiple sources having the same name are combined into one table.
Only relevant when composite is true.
Default: false
User Property: combine
<composite> boolean - When true, merge all source files into a single composite dataset.
Default: false
User Property: composite
<dataTypeFactoryName> String -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Set the DataType factory to add support for non-standard database vendor data types.
Default: org.dbunit.dataset.datatype.DefaultDataTypeFactory
User Property: dataTypeFactoryName
<datatypeWarning> boolean -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Enable or disable the warning message displayed when DbUnit encounter an unsupported data type.
Default: false
User Property: datatypeWarning
<dbconfig> Properties 1.0 DB configuration child element to configure DatabaseConfig properties in a generic way. This makes the many attributes/properties in this class obsolete and sets the value directly where it should go into which is the DatabaseConfig.
User Property: dbconfig
<escapePattern> String -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

escapePattern.
User Property: escapePattern
<metadataHandlerName> String 1.0-beta-3
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Class name of metadata handler.
Default: org.dbunit.database.DefaultMetadataHandler
User Property: metadataHandlerName
<ordered> boolean - Set to true to order tables according to integrity constraints defined in DB.
Default: false
User Property: ordered
<password> String - Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.
User Property: password
<schema> String - The schema name that tables can be found under.
User Property: schema
<settingsKey> String - Server's id in settings.xml to look up username and password. Default to ${url} if not given.
User Property: settingsKey
<skip> boolean - Skip the execution when true, very handy when using together with maven.test.skip.
Default: false
User Property: skip
<skipOracleRecycleBinTables> boolean 1.0-beta-2
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

skipOracleRecycleBinTables.
Default: false
User Property: skipOracleRecycleBinTables
<sources> File[] - DataSet files.
User Property: sources
<src> File -
Deprecated.
1.0

DataSet file; please use sources instead.
User Property: src
<supportBatchStatement> boolean -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Enable or disable usage of JDBC batched statement by DbUnit.
Default: false
User Property: supportBatchStatement
<transaction> boolean - When true, place the entire operation in one transaction.
Default: false
User Property: transaction
<useQualifiedTableNames> boolean -
Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

Enable or disable multiple schemas support by prefixing table names with the schema name.
Default: false
User Property: useQualifiedTableNames
<username> String - Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.
User Property: username

Parameter Details

<caseSensitiveTableNames>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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

<combine>

When true, table rows from multiple sources having the same name are combined into one table.
Only relevant when composite is true.
  • Type: boolean
  • Required: No
  • User Property: combine
  • Default: false

<composite>

When true, merge all source files into a single composite dataset.
  • Type: boolean
  • Required: No
  • User Property: composite
  • Default: false

<dataTypeFactoryName>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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

<dbconfig>

DB configuration child element to configure DatabaseConfig properties in a generic way. This makes the many attributes/properties in this class obsolete and sets the value directly where it should go into which is the DatabaseConfig.
  • Type: java.util.Properties
  • Since: 1.0
  • Required: No
  • User Property: dbconfig

<driver>

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

<escapePattern>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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

<ordered>

Set to true to order tables according to integrity constraints defined in DB.
  • Type: boolean
  • Required: No
  • User Property: ordered
  • Default: false

<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>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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

<sources>

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

<src>

Deprecated.
1.0

DataSet file; please use sources instead.
  • Type: java.io.File
  • Required: No
  • User Property: src

<supportBatchStatement>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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

<transaction>

When true, place the entire 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
  • User Property: url

<useQualifiedTableNames>

Deprecated.
since 1.0 - use the dbconfig attribute and the nested elements for this

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