-----Original Message-----
From: marijan milicevic [mailto:[email protected]]
Sent: Friday, January 27, 2012 10:58 AM
To: [email protected]
Subject: Re: Maven Build and Deploy Best Practices
Hi Tony,
On 01/27/2012 04:38 PM, Carlucci, Tony wrote:
Hello,
We have been trying to determine the best way to build and deploy Rave
based projects internally (in reality Maven 3 projects). Our current software
migration process requires us to build a "generic" artifact of any application
(without any environment specific properties) that can be deployed to any of
our environments (dev, qa, prod, etc). The deploy process essentially
retrieves the generic artifact and applies the environment specific settings
(like urls to external resources, email addresses, LDAP urls, etc), and copies
the environment-specific WAR to the appropriate server.
The majority of our applications are Ant based and we have a neat home-
grown Task that performs string token substitutions of our files which contain
placeholders for the environment specific values. This lets us customize any
file in our application (.properties, application-context.xml, web.xml, etc)
during the deploy process.
Our question is: how do we best do this for Maven 3 based projects? We
need to build the "generic" artifact (which gets stored in our Software
Repository application) and then apply the environment specific properties at
deploy time. I know Maven supports profiles but these seem to be needed
during the build/packaging phase, and would undoubtedly place an
environment specific artifact in both the Maven repository and our internal
artifact repository tool. Is it better to externalize all environment specific
properties outside of the WAR?
we (at Hippo) mostly use this approach: storing stuff outside of the WAR
(albeit for different product). What we try to avoid is to many
differences within appication-contex, web.xml etc. files and use
properties as much as possible, actually, in most cases those files are
identical for all environments.
A lot of the security issues is also solved by applying this (e.g. no
user names nor passwords are stored on developers machines /svn/git etc).
I think Rave can pretty much be used this way.
cheers
marijan