We have very custom ant build files for our projects, which basically do this:

* Some pre-compilation work (e.g. code generation)
* Compiling Java code
* 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)

Currently, our ant integration consists of telling Eclipse to run the "do it all" ant target (which does its own compilation).

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.)

Are the suggestions for strategies to follow here?

* 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?
* Should we run ant first, then the Java builder, or vice versa? What should be the refresh settings?
* Do we want to tell Eclipse to rebuild class files touched by others, or not?

Thanks for any suggestions.