title: Ant script: Prevent duplication of JAR in javac-classpath war-lib
body: <p>I have a ANT script and I have a lot of duplicated path to same set JAR files.
  But there is so many double wording in the classpath and also in the war element.</p>
  
  <pre><code>&lt;path id="my.classpath"&gt;
    &lt;pathelement location="folderA/subFolderA/1.0/A.jar"/&gt;
    &lt;pathelement location="folderC/subFolderB/1.0/B.jar"/&gt;
    &lt;pathelement location="folderF/subFolderZ/2.0/Z.jar"/&gt;
    &lt;pathelement location="compile/subFolderX/1.0/onlyForJavac.jar"/&gt;
  &lt;/path&gt;
  ....
  &lt;javac ...&gt;
   &lt;classpath refid="my.classpath" /&gt;
  &lt;/javac&gt;
  ....
  &lt;war ...&gt;
   &lt;lib file="folderA/subFolderA/1.0/A.jar"/&gt;
   &lt;lib file="folderC/subFolderB/1.0/B.jar"/&gt;
   &lt;lib file="folderF/subFolderZ/2.0/Z.jar"/&gt;
   &lt;lib file="moreFolderF/subFolderZ/2.0/additionFile.jar"/&gt;
   &lt;lib file="moreFolderF/subFolderZ/2.0/additionRuntimeFile.jar"/&gt;
  &lt;/war&gt;
  </code></pre>
  
  <p>I want to summary them into ONE list which is easier to keep update.</p>
  
  <p>But I am blocked as I have no idea how to share a path-like-structure with a fileset-like-structure.</p>