ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Sampson" <>
Subject RE: Error with jar task: A zip file cannot include itself (Ant 1.3)
Date Thu, 08 Mar 2001 07:17:15 GMT
Stefan Bodewig <> wrote:

> Justin Sampson <> wrote:
> > The problem was during a jar task which was building a jar of a
> > directory in the directory itself:
> > 
> >     <jar jarfile="foo/foo.jar" basedir="foo" />
> > 
> > Ant seemed to be trying to include the jar file in itself, giving
> > the error "A zip file cannot include itself". The jar didn't exist
> > before running
> But when the directory gets scanned, it does (because the file has
> already been opened for writing).

That's what I figured. Running jar from the command line doesn't complain,
but I just realized it doesn't complain even if the jar file does already
exist, so it must be doing an implicit exclusion.

> > But I'm wondering if this is a bug, and what has changed from 1.2.
> The opposite of a bug. It is a bug of Ant 1.2 to not raise an exception
> if you try to include a zip file into itself.

Okay, thanks!


View raw message