ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 32526] Add "whenempty" attribute to <fileset>
Date Tue, 07 Oct 2008 13:15:22 GMT

--- Comment #2 from Mike Cepek <>  2008-10-07 06:15:21 PST ---
My use case for this feature is creating release tarballs which must include
all specified files:

<tar destfile="${patch}/patch-${my.version}.tar.gz" compression="gzip">
    <tarfileset dir="${dist}" username="admin" group="admin">
        <include name="lib/my-main.jar" />
        <include name="tools/lib/my-tools.jar" />
        <include name="conf/VERSION" />
    <tarfileset dir="export/release" prefix="conf" username="admin"
       <include name="spring/menu.xml" />
       <include name="updates/connections.xml" />

I'm pretty shocked that using the NAME attribute like this (without wildcards)
will silently succeed even if the file doesn't exist.

I note that only the values "skip" and "fail" seem to be appropriate for
WHENEMPTY with <fileset> (<zip> also allows "create", which doesn't seem be
applicable in this context).  This somewhat argues for using FAILONERROR
instead (which is boolean) as used in <copy>.

Then there's the issue of what to do if this new <fileset> attribute is used in
a <zip> task which specifies WHENEMPTY -- which one takes precedence?  Allowing
the nested one (<fileset>) to override probably makes the most sense.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message