> > I'm not sure what you mean by optional in this case... the user
> > wouldn't have to specify anything in this case - it would all be
> > hard-coded in the relevant classes (with zip just returning an
> > "include everything" ZipFileSet).
>
> This is what I mean - make it possible for the user to say "I want the
> include everything fileset, even if I said <jar> and not <zip>".
>
> But start out with whatever seems most appropriate to you.
Right - I see what you mean now. However, during a meeting I worked out
a
rather larger problem: half of the point of being able to update an
archive
is to freshen files. I don't believe the original chunk (move, zip
including
original, delete temp) will work with this. For instance, the small
test:
<target name="test">
<delete file="test.zip"/>
<zip zipfile="test.zip">
<fileset dir="test1" includes="a.txt"/>
<fileset dir="test2" includes="a.txt"/>
</zip>
</target>
(with appropriate files)
gave a java.util.zip.ZipException: duplicate entry: a.txt
So the ZipFileSet to include has to *exclude* all files that are about
to be
added. That could be slightly tricky - at least for someone like me
without
much Ant experience.
I'll think on it... I believe this is a problem that enough people are
going
to want to get past that it's worth putting some real effort in.
Jon