You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jordan Reed <jo...@hotmail.com> on 2003/04/01 01:33:10 UTC

Updating the Manifest on a Dynamic List of Jars

I'm trying to update the manifest file on a dynamic set of jars and unsure how to make this happen.

During my build process I create a bunch of EJB jars in a directory called "jars".  

I know want to go threw all the jars and call the ant task of:
        <jar
            basedir="${jar.dir}"
            jarfile="${jar.dir}/MyEjb.jar"
            excludes="**/*"
            update="true">
            <manifest>
                <attribute
                    name="Class-Path"
                    value="${project.manifest.classpath}"/>
            </manifest>
        </jar>

but the <jar> task requires me to specify the name of my jarfile.  I don't want to have to know in advance all the jars that are going to be in that directory and have a separate <jar> task for each one.  Is there a way for ant to determine all the jars and interate over them using this task?

Thanks,
Jordan