I'm using ant to generate the MANIFEST.MF
for a .jar, and I need to add multiple manifest <section>
blocks based on a list of files in a directory. However, I need to automate the process to do this at build-time since the list will change between development and deployment.
For example:
<manifest file="MANIFEST.MF">
<foreach files="./*">
<section name="section">
<attribute name="Attribute-Name" value="$file"/>
</section>
</foreach>
</manifest>
I've looked at foreach
from Ant-contrib but it doesn't look like it will work in this instance.
Is this possible?