Take a properties files like
#File One
#Section One
sect1.number=Test1
sect1.sample=Test2
sect1.test=Test3
#Section Two
sect2.number=Test1
sect2.sample=Test2
sect2.test=Test3
After running this ant:
<property file="sample1.properties"/>
<propertyfile file="sample1.properties">
<entry key="sect1.number" value="ABC"/>
<entry key="sect1.sample" value="B"/>
<entry key="sect1.test" value="ABC"/>
<entry key="sect2.number" value="B"/>
<entry key="sect2.sample" value="ABC"/>
<entry key="sect2.test" value="B"/>
</propertyfile>
The properties file will end as:
#Updated on blah
sect2.sample=ABC
sect2.test=B
sect1.sample=B
sect1.number=ABC
sect2.number=B
sect1.test=ABC
Note the comments are gone and the order is different.
What am I doing wong, is there a work around?
Grae