Suppose that I have two properties file (say a.properties and b.properties) which contains key value pair. How to write ANT task to create a new properties file (say c.properties) which contains the key value pair of both these files(a and b). Please help.
Best How To :
You can use concat
<target name="concat"> <concat destfile="c.properties" > <fileset file="a.properties" /> <fileset file="b.properties" /> </concat> </target> see also https://ant.apache.org/manual/Tasks/concat.html
My tests show that if a.properties and b.properties contain the same properties the definition in b.properties is used. I don't know if this is documented to function like that.