Suppose I want to create and use an H2 database for my integration tests.
Maven has a command to run tests: mvn test
.
Is there a way to tell maven to start an H2 database server for the tests and stop it when it's done?
I imagine this working similar to how I can run tomcat via a Maven command (mvn tomcat:run
).
Sorry if this question is nonsensical, I'm still wrapping my head around new concepts.
question from:https://stackoverflow.com/questions/2205126/starting-an-h2-database-server-from-maven