maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <br...@apache.org>
Subject Re: Deploy a webap to multiple environments (test, pre-prod, prod)
Date Thu, 10 Jun 2004 01:35:20 GMT
I ensure all differences are externalised from the WAR file. For the appservers
we use (resin, tomcat), anything in web.xml can be put outside the webapp and
added to it (<Context> definition in server.xml, <web-app in resin.conf). So
configuration goes into JNDI environment entries, context-params, resources, etc.

For situations where you need to have whole different versions of config files,
the webapp bundles a stage and live version (for dev we copy in whatever suits
as part of the build - as long as the deployed version = live). An example is
log4j-quiet.xml and log4j-verbose.xml. A context-param is then set to say which
one to select.

(If you are actually using log4j, I recommend the log4j sandbox stuff for web
applications).

HTH,
Brett

Quoting Laurent PETIT <lpetit@sqli.com>:

> Hello,
> 
> I recently read a thread about this subject, but was not entirely convinced
> by the answer.
> 
> I think this is a very common problem : you develop a webapp, and you have
> to deploy it on multiple configurations : generally one for each
> test-process environment : internal ( integration server ), in
> pre-production on the client network, and eventually in production on the
> client network.
> 
> It is common that you then have to setup different levels for logs,
> different database schema names, different pathnames, ... generally in some
> well identified properties files.
> 
> I saw an answer to this problem, which was to setup multiple anemic maven
> projects which will hold the properties differences.
> 
> 
> I'm not sure this is a "recommended best practice" for the problem ?
> 
> What do you folks think about it ?
> 
> What do you do in your own projects ? (even if it is not as "a beautiful
> solution" as it should be, what does *work* for you ?)
> 
> Thanks in advance,
> 
> -- 
> Laurent PETIT
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message