Before running my JUnittest suite via maven (i.e. mvn surefire-report:report).. I want maven to first create my database schema for me as all my tests persist
into this database. I don't want the user to have to manually create the test schema before executing the tests. I have a file "create_schema.sql" which i want maven
to execute in the generate-test-resources lifecycle (if thats the correct place). Can anyone point me in the direction of an example where something like this is done
You should look into one of the database-related unit-testing frameworks like dbunit.
These frameworks make for repeatable database tests by setting up up the database, loading initial data, running the tests, then deleting the data so that you have a clean venue for the next test cycle with no leftovers to pollute things. Commonly, they'll also hook to a lightweight database that runs locally so that you can do these tests without needing access to a heavyweight database server.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: getting maven to create my DB before tests are run