views:

94

answers:

2

I have a workspace with several projects, that may be deployed in several configurations.

When exporting to WAR from within Eclipse, i would like to specify the configuration, and have several properties in some configuration files exported to change according to that configuration - the context path attribute of the context.xml, the names of the log files specified in the log4j properties file, etc.

Currently, we open the WAR, and manually change the values in an editor. This, of course, leads to many mistakes.

What is the best practice to automate this task?

A: 

Why not have a build script, something with ANT for example?

dpb
A: 

As dbp already answered, you need a build-tool that does that. Just to be complete I would like to mention Maven (which is actually more than just a build-script).

lostiniceland