You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/09/16 09:53:08 UTC

DO NOT REPLY [Bug 45819] New: [FilterSet] allow inclusion / exclusion patterns on filterset

https://issues.apache.org/bugzilla/show_bug.cgi?id=45819

           Summary: [FilterSet] allow inclusion / exclusion patterns on
                    filterset
           Product: Ant
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: remie@backbase.com


Created an attachment (id=22589)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22589)
Filtering, and beyond!

It would be nice if it is possible to add a pattern to a filterset to define
which files should be processed, or omitted.

For instance, the following task will copy all contents from directory srcDir
to directory destDir, replacing all instances of someToken:

<copy failonerror="false" todir="${destDir}">
  <fileset dir="${srcDir}" />
  <filterset>
    <filter token="${someToken}" value=""/>
  </filterset>
</copy>

Now, in my real life scenario, this fileset includes resources like images
which actually contain someToken, making the images look like an 80s arcade
console (see attachment).

This forces me to do the following:

<copy failonerror="false" todir="${destDir}">
  <fileset dir="${srcDir}" includes="**/*.html/>
  <filterset>
    <filter token="${someToken}" value=""/>
  </filterset>
</copy>

<copy failonerror="false" todir="${destDir}">
  <fileset dir="${srcDir}" excludes="**/*.html/>
  <filterset>
    <filter token="${someToken}" value=""/>
  </filterset>
</copy>

This seems odd, for the inclusion pattern lies not on the copy task (I want all
files to go in the same destination directory. I simply do not want the filter
to be applied to all files. An inclusion / exclusion flag on the filterset
would be appropriate here.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.