title: How do I control spring injections that vary between the test environment and the production environment?
body: <p>I'm setting up a CI situation in which I will deploy my web app to a test environment.  In this test environment, I want the business objects used by the app to be mocks of the real ones; the mocks will return static test data.  I'm using this to run tests agains my ui. I'm controlling the injections of these business object dependencies with Spring; it's a struts 2 application, for what that's worth. </p>
  
  <p>My question is Maven related, I think.  What is the best way to have my Maven build determine whether or not to build the spring configuration out for injecting the mocks or injecting the real thing?  Is this a good use for maven profiles?  Other alternatives?  </p>