jar
combine multiple jar files and remove signatures
I just came across a situation where I had to join multiple jar files and my own classes into one jar bundle. Ant comes in handy:
<jar destfile="${app.id}-${app.version}.jar"
index="true"
filesetmanifest="merge">
<fileset dir="${classes.dir}"/>
<zipgroupfileset dir="${lib.dir}" includes="*.jar" />
</jar>
This takes all the files in ${classes.dir}, packs them in a jar and add the content of all the jar files in ${lib.dir}. In this case, we merge multiple manifests, but this can be changed according to the jar task documentation.
› Continue reading