Yes, I agree normally that would be best practice, and our current 4.1 install is setup that way.
I think what I'm confused on then, is how to do manage this in Maven when you're doing an all in one archetype startup or Pamp-to-war. (Vs say building for the production environment)
Currently we run our ant script, assembled all the amps to a directory, then copy them over them to the specific environment. Then run the alfresco-mmt tool to build a new war. Environment specific stuff sits in tomat/shared/classes/extension.
With the way I have Maven all-in-one project setup, I ended up with both the license and alfresco-global.properties all inside the produced WAR, because without those files I couldn't run the embedded tomcat properly. I can just drop the new WAR into the environment, but everything is self contained and I dont really like have environment specific configs right tin the war.
So, now I have one alfresco-global.properties inside my custom Crowd AMP that contains environment specific URL for authentication (injected through a spring context), and then I have an alfresco-global.properties under repo/src/main/properties/test that contains normal Alfresco environment stuff.
Ideally, I wanted my Crowd AMP to contain different property files per environment, but I couldnt figure out how to reference them when running the pamp-to-war. (Normally they would just be in the classpath and we used a propertyWrapper to reference them).
Do you have an link to any examples on how you would configure secondary objects for different environments?