I'm trying to figure out how to use the "queries" parameter for the maven2 export goal. Can you please provide an example on your website? I could not figure out how to search the mail archives to see if this had been asked/answered before. Multiple searches in the BUG and FEATURE REQUEST trackers produced no similar requests.
Hi,
I'm not sure whether you are aware of the fact that the dbunit maven plugin is currently maintained on a different site: http://mojo.codehaus.org/dbunit-maven-plugin/export-mojo.html
You can find an example for the export goal at http://mojo.codehaus.org/dbunit-maven-plugin/examples/export-full.html
Here an example that should work (but I did not test this, so feel free to correct me if I'm wrong):
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>export</goal>
</goals>
<!-- specific configurations -->
<configuration>
<format>xml</format>
<dest>target/dbunit/export.xml</dest>
<queries>
<query implementation="org.dbunit.ant.Query">
<name>myQueryName</name>
<sql>select * from MYTAB</sql>
</query>
</queries>
</configuration>
</execution>
[...]
</executions>
Please let me know if it works.
rgds,
matthias
Thanks gommma, I didn't realize I was posting in the wrong place, my bad.
Your example is exactly what I was looking for and works great. I wasn't sure how to specify the xml element as a "Query" type, I see you do so by adding "implementation = ...".
Much appreciated!
I committed the example to the svn trunk rev. 1094 and with the next release of the dbunit-maven-plugin (newly hosted in dbunit sf SVN) it will be on the site.
regards,
matthias
Ticket moved from /p/dbunit/feature-requests/143/
Can't be converted: