You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Kuiper, Arnout" <Ar...@nl.origin-it.com> on 2000/02/03 07:32:48 UTC
Question on zip vs. jar format
While browsing through the code, I noticed that in the jar task
besides the files, all encountered directories are stored.
This is not done in the zip task.
According to the jarfile format spec, "a jar file is a zipfile with
a manifest".
Can somebody tell me why directories are stored in a jar (and not in
a zip)? And whether they can safely be removed or not from a jar.
Cheers,
Arnout Kuiper
Re: Question on zip vs. jar format
Posted by James Duncan Davidson <ja...@eng.sun.com>.
> Before you do that I guess we should understand whether jars do require
> those directory entries.
Off hand, I don't think they do -- but why not be safe and just leave
them in in both the .zip and .jar case?
--
James Davidson duncan@eng.sun.com
Java + XML / Portable Code + Portable Data !try; do()
RE: Question on zip vs. jar format
Posted by Conor MacNeill <co...@m64.com>.
Arnout,
I don't know why :-). I think the Jar and Zip tasks were developed by
different people and perhaps they are just different idioms. I subsequently
refactored it so that most of the Zip code was reused by the Jar task (also
making some nice behaviour available for the Jar task). During that
refactoring I noticed that these tasks were different in this area so I
preserved this behaviour. You could eliminate it by simply removing the
zipDir method in Jar.java
Before you do that I guess we should understand whether jars do require
those directory entries.
--
Conor MacNeill
conor@m64.com
M64 Pty Limited
> -----Original Message-----
> From: Kuiper, Arnout [mailto:Arnout.Kuiper@nl.origin-it.com]
> Sent: Thursday, 3 February 2000 17:33
> To: 'ant-dev@jakarta.apache.org'
> Subject: Question on zip vs. jar format
>
>
> While browsing through the code, I noticed that in the jar task
> besides the files, all encountered directories are stored.
> This is not done in the zip task.
>
> According to the jarfile format spec, "a jar file is a zipfile with
> a manifest".
>
> Can somebody tell me why directories are stored in a jar (and not in
> a zip)? And whether they can safely be removed or not from a jar.
>
> Cheers,
>
> Arnout Kuiper
>