I have a project I would like to build using multiple configurations. I have a constant that needs to be different between builds but I do not know how to change it based on my config.
For example I would like to be able to do the following based off a value in a config file.
@WebService(targetNamespace = "http://example.com/")
public class CustomerWebService {
and
@WebService(targetNamespace = "http://demo.example.com/")
public class CustomerWebService {
We use ant for building.
I would advise attempting to emulate Maven resource filtering and profile properties
Source filtering
src/templates/MyFile.java
build.xml
Notes:
Build profiles
Property files
Each configuration has a different property file
build.xml
Choosing an alternative build profile