title: how to compile only changed source files using ANT
body: <p>I am trying to write ant build for compiling source folder here is my script <strong>target</strong> for compiling.</p>
  
  <pre><code> &lt;target name="compile" depends="init"&gt;
          &lt;javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true"&gt;
              &lt;classpath refid="master-classpath"/&gt;
          &lt;/javac&gt;
  
      &lt;/target&gt;
  </code></pre>
  
  <p>In my project I have near about 1000 <code>.java</code> files. When ever a single <code>.java</code> file is changed  above target tends to compile all <code>.java</code> files. Which make development very slow. I just want to know is there any way or code to change the behavior of task to compile only modified or changed <code>.java</code> file rather than all <code>.java</code> file. </p>
  
  <p>Please help me.</p>