On Mon, 06 Dec 2010 23:06:35 +0100, Dennis Lundberg wrote: > On 2010-12-06 20:44, Anthony BOUQUET wrote: >> I guys, >> >> >> >> I’m looking for some kind of plugin able to generate Database create >> script from a real database (based in an integration server) >> >> I looked after dbunit but it seems it only create schema with an >> already existing file. > > That's how I understand it as well. I've only used a little. > > > >> I want to achieve this in our test phase: >> >> · Retrieve real scheme from our integration server (We use >> MySQL) >> >> · Use db unit to create schema dtd >> >> · Create (by hand) some sample datas with the aid of dtd >> generated file >> >> · Create an in memory database (HSQL for example) with the >> retrieve scheme >> >> · Test dao classes with some samples data injected by dbunit >> >> >> >> Has anyone developed such a plugin ? > > Not that I have heard of. > > I'm curious though, why do you want to create the schema file from a > database? It seems backwards to me. > > We use a schema file that is checked into version control to set up our > database (Apache Derby) for unit testing DAO classes. That same file can > be used to set up the database on an integration server or a production > server. > > If you want to capture the schema from a live database you can use the > excellent Squirrel SQL client.
You might be able to use ddlutils and antrun. Some people have talked about this already on this list (for example: http:// maven.40175.n5.nabble.com/Ant-maven-antrun-ddlutils-td127191.html). Also, there seems to be at least two plugins for ddlutils: http://talisman.sourceforge.jp/maven-ddlutils-plugin/download.html http://jira.codehaus.org/browse/MOJO-1121 I don't know what the status of either are. Link to the ddlutils: http://db.apache.org/ddlutils/ I haven't used these with Maven yet, but I'm working on a project where they (at least one of the tools) has potential. . . . . just my two cents. /mde/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org