dbunit:operation
Full name:
org.dbunit:dbunit-maven-plugin:1.3.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 |
1.0 |
The class name of the JDBC driver to be used. User Property: dbunit.driver |
<format> |
String |
1.0 |
Dataset file format type. Valid types are: flat, xml, csv, and dtd Default: xmlUser Property: dbunit.format |
<type> |
String |
1.0 |
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: dbunit.type |
<url> |
String |
1.0 |
The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE. User Property: dbunit.url |
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<caseSensitiveTableNames> |
boolean |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisBe case sensitive when handling tables. See also: http://dbunit.sourceforge.net/properties.html#casesensitivetablenames Default: falseUser Property: dbunit.caseSensitiveTableNames |
<combine> |
boolean |
1.0 |
When true, table rows from multiple sources having the same name are combined into one table.
Only relevant when composite is true. Default: falseUser Property: dbunit.combine |
<composite> |
boolean |
1.0 |
When true, merge all source files into a single composite dataset. Default: falseUser Property: dbunit.composite |
<dataTypeFactoryName> |
String |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisSet the DataType factory to add support for non-standard database vendor data types. Default: org.dbunit.dataset.datatype.DefaultDataTypeFactoryUser Property: dbunit.dataTypeFactoryName |
<datatypeWarning> |
boolean |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisEnable or disable the warning message displayed when DbUnit encounter an unsupported data type. Default: falseUser Property: dbunit.datatypeWarning |
<dbconfig> |
Properties |
1.0 |
DB configuration child element to configure org.dbunit.database.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 org.dbunit.database.DatabaseConfig.User Property: dbunit.dbconfig |
<escapePattern> |
String |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisescapePattern. User Property: dbunit.escapePattern |
<metadataHandlerName> |
String |
1.0-beta-3 |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisClass name of metadata handler. Default: org.dbunit.database.DefaultMetadataHandlerUser Property: dbunit.metadataHandlerName |
<ordered> |
boolean |
1.0 |
Set to true to order tables according to integrity constraints defined in DB. Default: falseUser Property: dbunit.ordered |
<password> |
String |
1.0 |
Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key. User Property: dbunit.password |
<replacementDataSetClass> |
String |
1.3 |
Fully-qualified class name of a org.dbunit.dataset.ReplacementDataSet subclass to wrap each loaded dataset before executing the operation. The class must have a public constructor that accepts a single org.dbunit.dataset.IDataSet argument. Use this to apply token substitution (e.g. replacing [NULL] with SQL NULL) without any coupling to the plugin itself.
Example: public class MyReplacements extends ReplacementDataSet {
public MyReplacements(IDataSet wrapped) {
super(wrapped);
addReplacementObject("[NULL]", null);
}
}
User Property: dbunit.replacementDataSetClass |
<schema> |
String |
1.0 |
The schema name that tables can be found under. User Property: dbunit.schema |
<settingsKey> |
String |
1.0 |
Server's id in settings.xml to look up username and password. Default to ${url} if not given. User Property: dbunit.settingsKey |
<skip> |
boolean |
1.0 |
Skip the execution when true, very handy when using together with maven.test.skip. Default: falseUser Property: dbunit.skip |
<skipOracleRecycleBinTables> |
boolean |
1.0-beta-2 |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisskipOracleRecycleBinTables. Default: falseUser Property: dbunit.skipOracleRecycleBinTables |
<sources> |
File[] |
1.0 |
DataSet files. User Property: dbunit.sources |
<src> |
File |
- |
Deprecated. 1.0 DataSet file; please use sources instead. User Property: dbunit.src |
<supportBatchStatement> |
boolean |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisEnable or disable usage of JDBC batched statement by DbUnit. Default: falseUser Property: dbunit.supportBatchStatement |
<transaction> |
boolean |
1.0 |
When true, place the entire operation in one transaction. Default: falseUser Property: dbunit.transaction |
<useQualifiedTableNames> |
boolean |
- |
Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for thisEnable or disable multiple schemas support by prefixing table names with the schema name. Default: falseUser Property: dbunit.useQualifiedTableNames |
<username> |
String |
1.0 |
Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key. User Property: dbunit.username |
Parameter Details
<caseSensitiveTableNames>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisBe case sensitive when handling tables.
See also: http://dbunit.sourceforge.net/properties.html#casesensitivetablenames
See also: http://dbunit.sourceforge.net/properties.html#casesensitivetablenames
- Type:
boolean - Required:
No - User Property:
dbunit.caseSensitiveTableNames - 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.
Only relevant when composite is true.
- Type:
boolean - Since:
1.0 - Required:
No - User Property:
dbunit.combine - Default:
false
<composite>
When true, merge all source files into a single composite dataset.
- Type:
boolean - Since:
1.0 - Required:
No - User Property:
dbunit.composite - Default:
false
<dataTypeFactoryName>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisSet the DataType factory to add support for non-standard database vendor data types.
- Type:
java.lang.String - Required:
No - User Property:
dbunit.dataTypeFactoryName - Default:
org.dbunit.dataset.datatype.DefaultDataTypeFactory
<datatypeWarning>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisEnable or disable the warning message displayed when DbUnit encounter an unsupported data type.
- Type:
boolean - Required:
No - User Property:
dbunit.datatypeWarning - Default:
false
<dbconfig>
DB configuration child element to configure
org.dbunit.database.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 org.dbunit.database.DatabaseConfig.- Type:
java.util.Properties - Since:
1.0 - Required:
No - User Property:
dbunit.dbconfig
<driver>
The class name of the JDBC driver to be used.
- Type:
java.lang.String - Since:
1.0 - Required:
Yes - User Property:
dbunit.driver
<escapePattern>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisescapePattern.
- Type:
java.lang.String - Required:
No - User Property:
dbunit.escapePattern
<format>
Dataset file format type. Valid types are: flat, xml, csv, and dtd
- Type:
java.lang.String - Since:
1.0 - Required:
Yes - User Property:
dbunit.format - Default:
xml
<metadataHandlerName>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisClass name of metadata handler.
- Type:
java.lang.String - Since:
1.0-beta-3 - Required:
No - User Property:
dbunit.metadataHandlerName - Default:
org.dbunit.database.DefaultMetadataHandler
<ordered>
Set to true to order tables according to integrity constraints defined in DB.
- Type:
boolean - Since:
1.0 - Required:
No - User Property:
dbunit.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 - Since:
1.0 - Required:
No - User Property:
dbunit.password
<replacementDataSetClass>
Fully-qualified class name of a
org.dbunit.dataset.ReplacementDataSet subclass to wrap each loaded dataset before executing the operation. The class must have a public constructor that accepts a single org.dbunit.dataset.IDataSet argument. Use this to apply token substitution (e.g. replacing [NULL] with SQL NULL) without any coupling to the plugin itself.
Example:
public class MyReplacements extends ReplacementDataSet {
public MyReplacements(IDataSet wrapped) {
super(wrapped);
addReplacementObject("[NULL]", null);
}
}
- Type:
java.lang.String - Since:
1.3 - Required:
No - User Property:
dbunit.replacementDataSetClass
<schema>
The schema name that tables can be found under.
- Type:
java.lang.String - Since:
1.0 - Required:
No - User Property:
dbunit.schema
<settingsKey>
Server's id in settings.xml to look up username and password. Default to ${url} if not given.
- Type:
java.lang.String - Since:
1.0 - Required:
No - User Property:
dbunit.settingsKey
<skip>
Skip the execution when true, very handy when using together with maven.test.skip.
- Type:
boolean - Since:
1.0 - Required:
No - User Property:
dbunit.skip - Default:
false
<skipOracleRecycleBinTables>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisskipOracleRecycleBinTables.
- Type:
boolean - Since:
1.0-beta-2 - Required:
No - User Property:
dbunit.skipOracleRecycleBinTables - Default:
false
<sources>
DataSet files.
- Type:
java.io.File[] - Since:
1.0 - Required:
No - User Property:
dbunit.sources
<src>
Deprecated.
1.0
1.0
DataSet file; please use sources instead.
- Type:
java.io.File - Required:
No - User Property:
dbunit.src
<supportBatchStatement>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisEnable or disable usage of JDBC batched statement by DbUnit.
- Type:
boolean - Required:
No - User Property:
dbunit.supportBatchStatement - Default:
false
<transaction>
When true, place the entire operation in one transaction.
- Type:
boolean - Since:
1.0 - Required:
No - User Property:
dbunit.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 - Since:
1.0 - Required:
Yes - User Property:
dbunit.type
<url>
The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.
- Type:
java.lang.String - Since:
1.0 - Required:
Yes - User Property:
dbunit.url
<useQualifiedTableNames>
Deprecated.
since 1.0 - use the
since 1.0 - use the
dbconfig attribute and the nested elements for thisEnable or disable multiple schemas support by prefixing table names with the schema name.
- Type:
boolean - Required:
No - User Property:
dbunit.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 - Since:
1.0 - Required:
No - User Property:
dbunit.username


