I have an application in development that supports several databases including SQL*Server 2008, Oracle 10G, Oracle 11G, MYSQL 5, etc. Already within Maven I have done three things:
1) There is a profile for each database so that the system can use it for integration testing during the build.
2) Maven invokes the hibernate3 plugin to automatically generate a schema script using hbm2ddl.
3) A Hudson matrix build is set up so that integration tests are run against every database automatically.
I have noticed (with no surprise) that the script created by hbm2ddl is different depending on the database dialect.
However, when packaging the system for customers we have to manually go into the various Hudson builds and pluck the database specific scripts from there. A tedious process that I am sure will bite us at the worst possible moment!!
Is there anyway that we can have Maven automatically generate and then gather up all these database scripts so that they can be packaged along side the WAR file we ship to customers? I was thinking of the Maven assembly plugin to zip it all up, but am not sure!