You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/08/19 14:09:02 UTC
DO NOT REPLY [Bug 30751] New: -
Jar with both attributes update="true" and filesetmanifest="true" is broken
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30751>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30751
Jar with both attributes update="true" and filesetmanifest="true" is broken
Summary: Jar with both attributes update="true" and
filesetmanifest="true" is broken
Product: Ant
Version: 1.6.2
Platform: PC
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: eric.fayol@netsecureone.com
I would like to update a jar and merge its manifest with manifests from the
filesets.
<jar destfile="jar1.jar" update="true" filesetmanifest="merge">
<zipfileset src="jar2.jar" includes="**"/>
</jar>
This doesn't work because filesetmanifest="true" makes <jar> build a new
archive after updating as we can see in the Ant ouput:
[jar] Updating jar: E:\jar1.jar
[jar] Building jar: E:\jar1.jar
Consequently, the jar now contains only files from jar2, except for manifest
which intriguingly is jar1's original.
Not setting filesetmanifest attribute would have produced an archive with both
jar1 and jar2's files but would not have updated manifest.
What I currently have to do to get the correct merged jar is:
<jar destfile="copy-of-jar1.jar" filesetmanifest="merge">
<zipfileset src="${LIB}/jar1.jar" includes="**"/>
<zipfileset src="${LIB}/jar2.jar" includes="**"/>
</jar>
<move file="copy-of-jar1.jar" tofile="jar1.jar" overwrite="true"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org