LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Java + Ant - multiple Jar update (https://www.linuxquestions.org/questions/programming-9/java-ant-multiple-jar-update-570492/)

revof11 07-18-2007 03:57 PM

Java + Ant - multiple Jar update
 
I have a single file that I wish to place in multiple, existing Jar files. The problem is that the number of Jar files will be growing significantly and I do not wish to copy-and-paste the Ant script pieces each time one appears.

The update I am currently using is this (roughly):

Code:

<jar jarfile="${my.jar.file.1}" update="true">
  <fileset file="${my.extra.info}" />
</jar>
<jar jarfile="${my.jar.file.2}" update="true">
  <fileset file="${my.extra.info}" />
</jar>

I would hate to reinvent the wheel and create a custom Ant task for this, so I would like to know if there is some way to do something similar to this (I could not find anything after Googling for a little while):

Code:

<jar update="true">
  <jars dir="${my.jar.dir}" includes="**/*.jar" />
  <fileset file="${my.extra.info}" />
</jar>



All times are GMT -5. The time now is 05:30 AM.