title: Including .properties files while building a project using ant
body: <p>How can i include .properties, .xml and other resource files while compiling the source code of a project using Ant? Here is my build file:  </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project name="NmzAzzist" basedir="." default="main"&gt;
      &lt;property name="src.dir" value="Source/Myproj" /&gt;
      &lt;property name="build.dir" value="ReleaseBuild/classes" /&gt;
      &lt;property name="jar.dir" value="ReleaseBuild" /&gt;
  
      &lt;path id="master-classpath"&gt;
          &lt;fileset dir="lib"&gt;
              &lt;include name="*.jar" /&gt;
          &lt;/fileset&gt;
      &lt;/path&gt;
  
      &lt;target name="clean" description="Clean output directories"&gt;
          &lt;delete dir="${build.dir}" /&gt;
      &lt;/target&gt;
  
      &lt;target name="build" description="Compile source tree java files"&gt;
          &lt;echo&gt;Compiling the source code&lt;/echo&gt;
          &lt;mkdir dir="${build.dir}" /&gt;
          &lt;javac destdir="${build.dir}" source="1.5" target="1.5" includeantruntime="false"&gt;
              &lt;compilerarg value="-Xlint:unchecked" /&gt;
              &lt;src path="${src.dir}" /&gt;
              &lt;classpath refid="master-classpath" /&gt;
  
          &lt;/javac&gt;
      &lt;/target&gt;
  
      &lt;target name="jar" depends="build"&gt;
          &lt;mkdir dir="${jar.dir}" /&gt;
          &lt;echo&gt;building jar!&lt;/echo&gt;
  
          &lt;jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${build.dir}"&gt;
              &lt;manifest&gt;
                  &lt;attribute name="Main-Class" value="com.ushustech.nmsazzist.NMSAzzistApp" /&gt;
              &lt;/manifest&gt;
          &lt;/jar&gt;
      &lt;/target&gt;
  
      &lt;target name="run" depends="jar"&gt;
          &lt;java jar="${jar.dir}/${ant.project.name}.jar" fork="true" /&gt;
      &lt;/target&gt;
  
      &lt;target name="main" depends="clean,run" /&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Right now my build is only compiling the Java files and producing classes. But I have some property and XML files in various folders (including the source folders), that I would like included in the output directory, that are not getting placed there now. I appreciate any suggestions in accomplishing this task.</p>