ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32526] Add "whenempty" attribute to <fileset>
Date Tue, 07 Oct 2008 13:15:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=32526





--- Comment #2 from Mike Cepek <mikecepek@yahoo.com>  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>
    <tarfileset dir="export/release" prefix="conf" username="admin"
group="admin">
       <include name="spring/menu.xml" />
       <include name="updates/connections.xml" />
    </tarfileset>
</tar>

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message