On Tue, Jan 25, 2011 at 12:50 PM, Anders Hammar <[email protected]> wrote:
> Ok, I see where we misunderstand each other. > > What you want to do is to build just one war. This war should not include > any environment configuration at all! Environment dependent configuration > should be handled outside of the war. > > Yes, we seem to finally be on the same wavelength! :) > One way to do this is to always load config file from the classpath. Every > app server/web container (?) provides some conf folder where tou can put > your configuration files so that they are added to the classpath. The > config > file should always be named the same name, regardless of the environment. > (How you version control the config files is outside the scope of this > discussion. It could be in a scm, in paper form, etc.)) > Another way is to read config through JNDI. > > I agree with you. I'm still quite new to advanced Maven topics so it still seems counter-intuitive to store the config file outside the .war - it adds one extra step of "deploy the .xml/config file" in the installation, but like Mark pointed out it makes the WAR more independent and more agile to configuration changes. Miguel
