Is there a way to update a jar file in Ant?
EDIT: For example, if I wanted to add some additional files to an already existing JAR file?
Is there a way to update a jar file in Ant?
EDIT: For example, if I wanted to add some additional files to an already existing JAR file?
Sure, that's totally possible. The ant Jar task can do anything the jar command line can do. You do it with the update
flag set to true instead of false.
<jar destfile="/x/y/z/file.jar"
basedir="/a/b/c/"
update="true"
/>
Where the destination jar is already in existence at that path.
EDIT: To set a path
<jar destfile="/x/y/z/file.jar"
update="true">
<zipfileset dir="/a/b/c"/ prefix="x/y/z" />
</jar>