In ant, I need to load a set of .properties files based on a pattern.
I tried:
<property>
<fileset includes="${propertiesDir}/*.properties"/>
</property>
but it doesn’t work because <property> doesn’t support nesting.
How can i load properties from files matching a pattern?
Thanks..
You could use the
concattask to concat all your properties files to a big temporary properties file, and the usepropertywith this big temporary properties file as attribute.Make sure to use fixlastline=”true” with the concat task to make sure each file ends with a new line character.
Example :