I'm trying to use ANT built-in (so no contrib) to create a configuration file.
What I want to do is if a property from a .properties file is set, ANT will replace the corresponding token in the configuration file.
But since I get 2 (or more) groups of properties, I first need to filter them.
For exemple :
build.properties :
test.p1=valueTestA
test.p2=valueTestB
prod.p2=valueProdA
prod.p3=valueProdB
base cfg file :
var1 = "@p1@";
var2 = "@p2@";
var3 = "@p3@";
In the end, depending if I use test or prod group of properties, only @p1@ @p2@ OR @p2@ @p3@ will be replaced (and other ignored)
I tried to use <propertyref>
and <mapper>
to filter but it looks like I'm doing it really wrong.
Any idea to help me to do this ?