title: How to use Ant include non-java resource files with compiled classes
body: <p>I have a Java project with all source files in the <code>src</code> folder. This src folder contains several packages. Some of these packages/folders do not include any Java code. They just contain some images that I use in the application as icons.</p>
  
  <p>The directory structure is similar to the following.</p>
  
  <pre><code>src/
  com/
     example/
         pk1/     # This contains only some Java files.
         pk2/     # This will contain some XML and Java code.
         im1/     # This subfolder will contain just the images
  </code></pre>
  
  <p>Now, when I use the <code>javac</code> task, it compiles all the Java files into class files and stores them in the destination directory that I specify. However, an non-java files remain as is in the source folder.</p>
  
  <p>I referred this <a href="https://stackoverflow.com/questions/1216744/adding-non-code-resources-to-jar-file-using-ant">Question</a> on SO. However, I think in my case I want to include all non-Java resource files (without the need to explicitly specifying what files to be moved) automatically into the <code>build</code> directory (one that contains all the class files) while following the same directory structure as in source.</p>
  
  <p>Pardon me if I am missing something very trivial, but how do I ask Ant to do this?</p>