title: Ant combine two refid to use as a classpath
body: <p>I have two refid to paths 'config.classpath' and 'test.classpath'.</p>
  
  <p>Now I would like to write something like</p>
  
  <pre><code>&lt;path id="config.classpath"&gt;
      &lt;filelist dir="${lib.dir}"&gt;
          ...
      &lt;/filelist&gt;
  &lt;/path&gt;
  
  &lt;path id="test.classpath"&gt;
      &lt;filelist dir="${lib.dir}"&gt;
          &lt;file name="junit-3.8.1.jar"/&gt;
      &lt;/filelist&gt;
  &lt;/path&gt;
  
  &lt;target name="test"&gt;
      &lt;junit&gt;
          &lt;classpath&gt;
              &lt;filelist refid="test.classpath"/&gt;
              &lt;filelist refid="config.classpath"/&gt;
          &lt;/classpath&gt;
          ...
      &lt;/junit&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>When I run the test task the build fails with</p>
  
  <pre><code>test.classpath doesn't denote a filelist
  </code></pre>
  
  <p>So I removed the  part of the whole stuff and tried it like this</p>
  
  <pre><code>&lt;filelist dir="${lib.dir}" id ="test.classpath"&gt;
      &lt;file name="junit-3.8.1.jar"/&gt;
  &lt;/filelist&gt;
  </code></pre>
  
  <p>But then it failed with </p>
  
  <pre><code>test.classpath doesn't denote a path
  </code></pre>
  
  <p>At that point I got a bit angry, since it was a path before and now that it isn't anymore it is complaining that it isn't one.</p>
  
  <p>How can I combine those two path ( without writing 30 extra lines ) in the junit task.</p>
  
  <p>I also tried this</p>
  
  <pre><code>&lt;path id="test.classpath"&gt;
      &lt;fileset dir="${lib.dir}"&gt;
          &lt;include name="junit-3.8.1.jar"/&gt;
      &lt;/fileset&gt;
  &lt;/path&gt;
  </code></pre>
  
  <p>But that gave me the "not a filelist error" too.</p>