I would like to find a suitable way to switch between multiple .propertiesfiles for different deployment configurations.
My initial inclination is to create a separate file selector.properties, the only property of which is used to determine the correct file:
properties.file=deploymentConfiguration1.properties
... for one deployment or:
properties.file=deploymentConfiguration2.properties
... for the next deployment.
Another developer of my team has a class ApplicationPropertiesin which:
private static final String PROP_FILE="someFileName.properties";
... is a means to this. However, I want to switch property files without rebuilding! Thank you in advance for your entry.
EDIT: Maybe I should have been clearer at first, but this is for a set of web services packaged as AAR. I just send it to the web server and let Tomcat and Axis2 do their job.
So, I do not think that some answers with command line options will work in this context.
source
share