Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Updating the Manifest on a Dynamic List of Jars

Updating the Manifest on a Dynamic List of Jars

2003-03-31       - By Jordan Reed

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

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.