1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
<?xml version="1.0"?>
<project name="fileset-test" default="main">
<target name="main">
<phingcall target="setup"/>
<phingcall target="test"/>
<phingcall target="cleanup"/>
</target>
<!-- perform initialization, e.g. touch files to make them newer, etc. -->
<target name="setup">
<mkdir dir="copytest" />
</target>
<selector id="myfiles">
<and>
<filename name="**"/>
<present targetdir="C:\sandbox\phing" present="srconly"/>
</and>
</selector>
<target name="test">
<copy todir="C:\sandbox\phing\build">
<fileset dir="C:\sandbox\phing">
<include name="**/*.properties"/>
<exclude name="build/**"/>
</fileset>
<mapper type="glob" from="*.properties" to="*.props"/>
</copy>
<copy todir="copytest" verbose="true">
<fileset dir="C:\sandbox\phing\build">
<and>
<filename name="**"/>
<present targetdir="C:\sandbox\phing" present="srconly"/>
</and>
</fileset>
</copy>
</target>
<target name="cleanup">
<delete dir="copytest"/>
</target>
</project>
|