Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:ms windows 2000/cygwin
-
Number of attachments :
Description
The example dbunit project that is mentioned here http://mojo.codehaus.org/dbunit-maven-plugin/ and located in svn here http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example/ does not function properly. The svn directory needs a missing datafile and a corrected pom.xml file.
Steps these are the steps that were required to make the example work.
mkdir dbunit_test
cd dbunit_test
mkdir -p src/test/data
download http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example/pom.xml to the dbunit_test directory
download http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example/src/test/data/create-table.sql to the src/test/data directory.
download http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/test/data/sample-data.xml to the src/test/data directory.
vim pom.xml file
change originalDataSetFile tag to "<originalDataSetFile>src/test/data/sample-data.xml</originalDataSetFile>" sans the quotes.
Using mvn produces
$ mvn
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
—
[INFO] Building Maven DbUnit Plugin - Example
[INFO] task-segment: [test]
[INFO] -------------------------------------------------------------------------
—
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [sql:execute
]
[INFO] Executing file: d:\dbunit_test\src\test\data\create-table.sql
[INFO] 3 of 3 SQL statements executed successfully
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [dbunit:operation
]
[INFO] [dbunit:export
]
[INFO] [dbunit:operation
]
[INFO] [dbunit:compare
]
[INFO] [dbunit:compare
]
[INFO] [dbunit:compare
]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Thu May 17 08:21:16 MST 2007
[INFO] Final Memory: 6M/13M
[INFO] ------------------------------------------------------------------------
dr_kludge@baloo /cygdrive/d/dbunit_test
$
Thanks for creating and maintaining the dbunit maven plugin.
add more details instruction how to run the example in the pom's description. Thanks for the feedbad. Fix is at rev:5056