I would like to find out how people use Maven to integrate database builds into the Maven build cycle. My team is currently using a multiple-pass approach, i.e. invoking Maven multiple times with different goals - primary reason is that the database schema is generated from a UML model during the build. Here's the sequence of steps we use to build and test our app:
1) mvn drop-schema <-- custom goal to drop existing schema from database 2) mvn compile 3) mvn create-schema <-- custom goal to create schema in the database 4) mvn test Note that doing a "mvn install" on freshly checked out source fails the tests because there is no schema in the database. We have to either perform all of the steps above or run "mvn install -Dmaven.test.skip=true" in order to succeed the build. How can we integrate the schema drop and create into the regular build cycle so that a simple "mvn install" would work? It appears that we should be hooking into some phases of the Maven build cycle, but I do not want to reinvent the wheel if there is a well known best practice around this. Thanks. Naresh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
