If you want to delete ant from your process, I would look at using build profiles with filters.
In this scenario, plug your properties files into the src/main/resources tree structure. Then parameterize the properties file with filter properties like this:
jdbc.url=${filtered.jdbc.property}
Then inside src/main/filters create filter files based upon profiles. so you could have dev-filters.properties sit-filters.properties, etc. These contain:
filtered.jdbc.property=jdbc url here
Then you setup build profiles for each region where you set an env
property pointing to the particular region your building. You can then setup the resources filter to use ${env}-filters.properties
for each build. Additionally, you can setup the war plugin to add the env property to your artifact so that you actually store 4 different artifacts in your repository under a different classifier.
You then simply build the app with each profile. You have to call the build for each profile, but it does work well.
Example of some settings in the POM:
<build>
<filters>
<filter>src/main/filters/filter-${env}-application.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
<configuration>
<classifier>${env}</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>LOCAL</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<env>LOCAL</env>
</properties>
</profile>
<profile>
<id>DEV</id>
<properties>
<env>DEV</env>
</properties>
</profile>
<profile>
<id>UAT</id>
<properties>
<env>UAT</env>
</properties>
</profile>
<profile>
<id>PROD</id>
<properties>
<env>PROD</env>
</properties>
</profile>
</profiles>
Also, props to this blog post which is where I originally found the steps to accomplish this.