ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Use of Ant's zip task - ensuring file order follows the rules for Epub3
Date Fri, 14 Jun 2013 12:09:27 GMT
On 2013-06-14, Kerry, Richard wrote:

> Does anyone have experience of Ant's zip task - in particular for
> building epub3 documents ?

Not for building epub3 documents but I know a thing about the task or
two :-)

> One of the rules for epub3 is that the mimetype file comes first.  It
> appears that this can't be enforced using Ant's zip task.  Does anyone
> know if there is any way of making this work ?  Or do I need to call
> out to an external application ?  (ie infozip's zip.exe.  7-zip
> doesn't appear to do it either).

Ant will always add directory entries before file entries unless you set
filesonly to true.  Without that you don't have any chance unless the
files you need first are in the top level directory.

If you don't need directories or the special files all live inside the
top level dir it should work if you specify the files that need specific
order explicitly in a filelist (which preserves order) or file resources
before specifying any filesets.

Something like

<zip filesonly="true" ...>
  <file file="mime-type-thingy"/>
  <fileset dir="where your content is">
    <exclude name="mime-type-thingy"/>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message