Let’s say I have an xml file with this part:
<tag name="key" value="${tag.val}"/>
This xml file is part of a project which is built with ant. Is it possible to inject some concrete value during the build process?
I want to have something like this in the built output:
<tag name="key" value="realvalue"/>
Yes, using a
filterset:You can also include a
filtersfileas a property file which contains key/value pairs.Of course, you also have the more simple option to source a properties file in your build file. Ant won’t yell at you if it does not exist, just make sure it exists when you invoke the build file…