Hi, I know that in order to use different configuration files (such as a persistence.xml), such as test configurations vs. production configurations I need to setup profiles to allow these different files to be used. What is the preferred way to indicate to maven how to find a configuration file that should be used? Such as, I have a persistence.xml file, currently I have my test database definition in it as a separate entry from my production configuration. This works fine in theory because I can mock out my persistence classes to use the test configuration for tests. The problem is that hibernate loads BOTH definitions when it starts up, whether it's used or not which causes problems with hot deploying, when my production environment is running (since my test config is loaded in production, and my tests are trying to use that configuration). I'm also running into problems of needing persistence configurations that can use other database servers other than assuming localhost.
Does anyone have a strategy or know of a link that I can look at that will help me implement an appropriate strategy to use/bundle differnet persistence.xml files based upon the loaded maven profile? Thanks! Ryan
