http://maven-plugins.sourceforge.net/maven-dbunit-plugin/properties.html
Maven Dbunit Plug-in Settings
This is a summary of the plugin's supported dbUnit properties. Refer to the dbUnit ant task properties page for more details.
Property
Optional?
Description
Default Value
maven.dbunit.deleteType |
Yes |
DbUnit operation type for delete.
|
DELETE
|
maven.dbunit.driverClassName |
Yes |
The class name of the JDBC driver to be used.
|
(none) |
maven.dbunit.format |
Yes |
Format for the import/delete functionality. Alternatively you could specify
flat or csv
.
|
xml
|
maven.dbunit.doctype |
Yes |
If set and format is "flat", add DOCTYPE
declaration referencing specified DTD to exported dataset. The DTD path
can be absolute or relative.
|
(none) |
maven.dbunit.importType |
Yes |
DbUnit operation type for import. Other valid values are:
UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT
|
INSERT
|
maven.dbunit.password |
Yes |
The password of the user connecting to the database.
|
(none) |
maven.dbunit.schema |
Yes |
The schema name that tables can be found under. |
(none) |
maven.dbunit.url |
Yes |
The JDBC URL for the database to access, e.g.
jdbc:db2:SAMPLE
.
|
(none) |
maven.dbunit.user |
Yes |
The user name used to connect to the database.
|
(none) |
maven.dbunit.datatypeFactory |
Yes |
Set the DataType factory to add support for non-standard database vendor data types.
|
dbUnit's default value |
maven.dbunit.useQualifiedTableNames |
Yes |
Enable or disable multiple schemas support by prefixing table names with the schema name.
|
false |
maven.dbunit.transaction |
Yes |
Wrap the operation in a single transaction or not.
|
false |
maven.dbunit.dest.dir |
Yes |
Directory to write the exported data file to.
|
${maven.build.dir}/dbunit |
maven.dbunit.dest.file |
Yes |
File name of the exported data file.
|
${maven.dbunit.dest.dir}/all.xml |
maven.dbunit.table.list |
Yes |
Delimeter separated list of table names
(see maven.dbunit.table.list.delim). Currently only used in
generate-dataset to list the tables to export all data from (if tables
or queries are not specified, exports all data from all tables). For
example:
table1,table2,table3
|
(none) |
maven.dbunit.table.list.delim |
Yes |
Table name delimeter for list of tables specified in maven.dbunit.table.list.
|
, (comma) |
maven.dbunit.query.list |
Yes |
Delimeter separated list of query names
(see maven.dbunit.query.list.delim). Currently only used in
generate-dataset to list the queries to use to export specific data from
(if tables or queries are not specified, exports all data from all
tables). For example:
qry1,qry2,qry3
For every query listed, it expects 2 additional properties:
(queryname).name
Name to use to refer to the sql statement.
(queryname).sql
SQL to execute to select the data for export.
For example, to pull the rows from COMPANY and PERSON tables for a user_id field of "dbunit":
maven.dbunit.query.list=company,person
company.name=COMPANY
company.sql=select * from person where user_id = 'dbunit'
person.name=PERSON
person.sql=select * from person where user_id = 'dbunit'
|
(none) |
maven.dbunit.query.list.delim |
Yes |
Query name delimeter for list of queries specified in maven.dbunit.query.list.
|
, (comma) |
maven.dbunit.verbose.level |
Yes |
The level of runtime messages to display.
Valid values:
0
Specify minimum messages.
1
Specify medium level messages (e.g. summary info).
2
Specify detailed level messages (e.g. debug)
|
分享到:
评论