apache ant: import filelist from file and use it in apply task
<p>I'm trying to import an external filelist into my ant build-script and using it during in an apply task.</p>

<p>listoffiles:</p>

<pre><code>&lt;filelist id="myfiles" dir="."&gt;
    &lt;file name="file1" /&gt;
    &lt;file name="file2" /&gt;
&lt;/filelist&gt;
</code></pre>

<p>build.xml:</p>

<pre><code>&lt;target name="build"&gt;
    &lt;property file="listoffiles"/&gt;

    &lt;apply executable="cat" parallel="false"&gt;
        &lt;srcfile/&gt;
        &lt;filelist id="${myfiles}" /&gt;
    &lt;/apply&gt;
&lt;/target&gt;
</code></pre>

<p>I'm not sure if this works. In a tutorial I read that <code>property</code> is for importing properties and <code>filelist</code> is defined as a <code>datatype</code>. I also tried to define the <code>filelist</code> inside <code>build.xml</code> and referencing it with the code above... also no success.</p>

<p>Hope someone can help me!</p>

<p>Thanks aronadaal</p>

<p>P.S: Is there a way to print the content of a filelist? Just for debugging purposes.</p>