On 28/02/2011 8:56 AM, Greg Akins wrote:
I would like some advice for structuring "config" files in a Maven
Project. Could someone give me some suggestions, or pointers to more
information?
The project needs different config files for each environment (dev,
qa, stage, production1, production2). Right now, in another Mavenized
project, I use profiles to create war files for each environment. So
the Configuration Manager needs to run 5 builds to get 5 war files and
move them all to the correct environment.
Our Configuration Manager would like the build process to result in a
single War, and one "config" file for each environment. Currently,
for another project, we create a single War, in an ant build, and then
tar the config files with absolute pathnames so it can just be
untarred on each server and the config files will end up on the class
path.
I realize that using automated deploys, or changing some other aspect
of the build process might be ideal. But it might also be difficult
for me to inject too much change to the process at this point.
Profiles are not the way to do this. They lead to madness and complete
frustration with Maven.
Your CM is right.
Wars should be environment neutral.
Once a war is tested, it should not be changed on its way to production.
Config files are generally deployed once for each release and managing
them a separate project is likely going to result in better managed
process that ensures that all configuration variables are updated in
parallel for each environment.
They are generally the province of the system administrator rather than
the development team which is the opposite of the code.
http://blog.artifact-software.com/tech/?p=58 might give you some ideas
that your CM will find helpful.
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]