title: Ant: Create tar without path information?
body: <p><strong>Update</strong>:  I am using Ant 1.8.1 on Windows XP.</p>
  
  <p>I am trying to write an Ant master build file for multiple projects.  I can successfully create a jar for each project, and I want to package all of these jars into a single tar.gz file.  Each jar file is located within the bin subdirectory of its respective project, but this path could be changed in the future.  I've tried something like this:</p>
  
  <pre><code>&lt;tar destfile="foo.tar.gz" compression="gzip" &gt;
     &lt;tarfileset dir="."&gt;
        &lt;include name="**/*.jar" /&gt;
     &lt;/tarfileset&gt;
  &lt;/tar&gt;
  </code></pre>
  
  <p>...which kind of works.  The only problem is that it maintains the directory structure within the jar.  I want a flat file.  So instead of:</p>
  
  <pre><code>foo.tar.gz
     project1
        bin
           project1.jar
     project2
        bin
           project2.jar
  etc...
  </code></pre>
  
  <p>I need:</p>
  
  <pre><code>foo.tar.gz
     project1.jar
     project2.jar
  </code></pre>
  
  <p>I attempted to use Ant's copy task to copy these jar files to a temporary directory and then tar them from there.  However, the copy operation replicates paths within the target directory. So, same problem.</p>