How to automate GWT builds using different sets of property values?

ant, build, gwt, java

Solution

You can clone your app's module XML file and change values of your custom properties in it (e.g. `MyAppStaging.gwt.xml` and `MyAppProd.gwt.xml`). You'll thus be able to script builds of different app versions and have different run configurations in your IDE. The drawback here is in subsequently needing to maintain both module XML files.

Problem

I need to be able to build two different versions of my GWT application using two different sets of property values. For example, one version would be built with the value of `custom_property` set to "A" and another would be built with the value of `custom_property` set to "B". Currently I am editing the application's module XML file in between builds by hand. So, to make one build I would first add: ``` <set-property name="custom_property" value="A"/> ``` And to make the other build I would change this line to: ``` <set-property name="custom_property" value="B"/> ``` This approach is working okay, but I would like to automate it if possible. Is there a good way to accomplish this?

Original source