Missing datafiles and wrong path in dbunits pom.xml file cause example svn
project to fail.
-------------------------------------------------------------------------------------------
Key: MOJO-800
URL: http://jira.codehaus.org/browse/MOJO-800
Project: Mojo
Issue Type: Bug
Components: dbunit
Environment: ms windows 2000/cygwin
Reporter: Greg Morgan
Priority: Minor
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 {execution: create-table}]
[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 {execution: insert}]
[INFO] [dbunit:export {execution: export}]
[INFO] [dbunit:operation {execution: clean-insert-the-exported-dataset}]
[INFO] [dbunit:compare {execution: compare-database-with-original-dataset}]
[INFO] [dbunit:compare {execution: compare-table-with-original-dataset}]
[INFO] [dbunit:compare {execution: compare-queries-with-original-dataset}]
[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] ------------------------------------------------------------------------
[EMAIL PROTECTED] /cygdrive/d/dbunit_test
$
Thanks for creating and maintaining the dbunit maven plugin.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email