I am using Maven2 to build my war packet. Base maven configuration is created with Appfuse http://appfuse.org/display/APF/Home.
When I do a mvn install (or mvn cargo:deploy), first a test phase executes, and then the final war is built and installed in the repository (or deployed to my app server). I want to run the tests against a different db than which the final package uses. So far I have not figured out how to do this. Test phase uses the same database as the final application. I figured out how to use profiles to switch between different databases. I can switch to test profile with, say, mvn test -Ptestdatabase. I could of course use mvn test -Ptestdatabase to test and then separate command mvn install -Dmaven.test.skip -Prealdatabase for creating the packet (and skipping tests), but that's not very nice. I want to be able to issue one command which does both phases, tests and packaging. I am guessing maybe the solution would be something like activating profile X for the tests phase, and then activating a different profile Y for the actual build. How could I accomplish this? -- View this message in context: http://www.nabble.com/How-to-use-different-databases-for-tests-and-the-actual-application--tf4696771s177.html#a13425450 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
