<?xml version="1.0"?>
<project default="cleanup" basedir=".">

  <target name="init">
    <mkdir dir="result" />
  </target>

  <target name="cleanup">
    <delete dir="result"/>
  </target>

  <target name="dynamicfilter">
    <path id="test-classes">
      <pathelement location="../../../../build/testcases" />
      <pathelement path="${java.class.path}" />
    </path>
    <typedef 
      name="customfilter" 
      classname="org.apache.tools.ant.filters.DynamicFilterTest$CustomFilter">
      <classpath refid="test-classes"/>
    </typedef>
    
    <concat destfile="result/input">
      hello world
    </concat>

    <copy file="result/input" tofile="result/dynamicfilter">
      <filterchain>
        <customfilter replace="o" with="O"/>
      </filterchain>
    </copy>
  </target>

</project>
