Bug 41125 - FilterReader classes should offer classpath, classpathref and loaderref
Summary: FilterReader classes should offer classpath, classpathref and loaderref
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.7.0
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2006-12-07 07:44 UTC by Henning Schmiedehausen
Modified: 2008-11-24 03:58 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Henning Schmiedehausen 2006-12-07 07:44:17 UTC
FilterReader is another extension point of ant like the <typedef> and <taskdef>
tasks. So it would be good if a <filterreader> element could also loaded from a
specific classpath using a specific loader. 

e.g. the serialver.sf.net project offers a serialversion tool that also contains
a FilterReader. However, it is not possible to load the FilterReader from a
specified load path (like the task). 

It would be good to have this in 1.7.0 (IMHO).
Comment 1 Peter Reilly 2006-12-07 08:16:03 UTC
Note that one can provide filtering
capability using the typedef task.
From the ant manual:
package my.customant;
import org.apache.tools.ant.filters.TokenFilter;

public class Capitalize
    implements TokenFilter.Filter
    public String filter(String token) {
        if (token.length() == 0)
            return token;
        return token.substring(0, 1).toUpperCase() +

  <typedef type="capitalize" classname="my.customant.Capitalize"
  <copy file="input" tofile="output">