summaryrefslogtreecommitdiffstats
path: root/test/resources/property/pathtofileset.xml
blob: b330cdfb4d68a672b39fdfac66970dcc9d128a57 (plain)
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
<project default="simple">
  <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath location="${antcontrib.jar}"/>
  </taskdef>

  <target name="cleanup">
    <delete quiet ="yes" dir="${test.dir}"/>
  </target>

  <target name="init">
    <property name="test.dir" value="pathtofilesset"/>
    <mkdir  dir="${test.dir}/0/0"/>
    <mkdir  dir="${test.dir}/0/1"/>
    <mkdir  dir="${test.dir}/1/0"/>
    <mkdir  dir="${test.dir}/1/1"/>
    <touch  file="${test.dir}/0/0/0.java"/>
    <touch  file="${test.dir}/0/1/1.java"/>
    <touch  file="${test.dir}/1/0/2.java"/>
    <touch  file="${test.dir}/1/1/3.java"/>
  </target>

  <target name="simple" depends="init">
    <path id="simple">
      <fileset dir="${test.dir}/0" includes="**/*.java"/>
      <fileset dir="${test.dir}/1" includes="**/*.java"/>
    </path>
    <pathtofileset dir="${test.dir}/0" pathrefid="simple"
                   ignoreNonRelative="yes" name="simple.0.fileset"/>
    <pathconvert targetos="unix" refid="simple.0.fileset" property="simple.0.property"/>

    <pathtofileset dir="${test.dir}/1" pathrefid="simple"
                   ignoreNonRelative="yes" name="simple.1.fileset"/>
    <pathconvert targetos="unix" refid="simple.1.fileset" property="simple.1.property"/>
  </target>

  <target name="simple-exception" depends="init">
    <path id="simple">
      <fileset dir="${test.dir}/0" includes="**/*.java"/>
      <fileset dir="${test.dir}/1" includes="**/*.java"/>
    </path>
    <pathtofileset dir="${test.dir}/0" pathrefid="simple"
                    name="simple.0.fileset"/>
  </target>

</project>