title: Strategy for using ant builds from Eclipse
body: <p>We have very custom ant build files for our projects, which basically do this:</p>
  
  <ul>
  <li>Some pre-compilation work (e.g. code generation)</li>
  <li>Compiling Java code</li>
  <li>Some post-compilation work (e.g. copying files to the classes directory for inclusion in the jar file; building jar files; copying files to some other place so that Tomcat picks them up)</li>
  </ul>
  
  <p>Currently, our ant integration consists of telling Eclipse to run the "do it all" ant target (which does its own compilation).</p>
  
  <p>This seems iffy because ant is compiling and not Eclipse, and the Eclipse compiler produces better error messages.  It's also unclear whether the ant build or the default Java build should run first.  And we need to tell the ant target to run basically when anything at all in the project has changed.  This leads to ant running the whole machinery on every save, basically.  This is slow.  (If we haven't edited the input file for the code generator, then we can skip running the code generator, and ant takes a long time even to figure out it doesn't have to do anything.)</p>
  
  <p>Are the suggestions for strategies to follow here?</p>
  
  <ul>
  <li>Do we need to split up the ant builder into multiple ant builders, each with their own set of watched resources, some of them running before the Java builder, others running after the Java builder?</li>
  <li>Should we run ant first, then the Java builder, or vice versa?  What should be the refresh settings?</li>
  <li>Do we want to tell Eclipse to rebuild class files touched by others, or not?</li>
  </ul>
  
  <p>Thanks for any suggestions.</p>