<depend>

The <depend> task is a preprocessor to the compilation stage. In a normal call to compile, the <javac> process works out which classes to compile by determining which class files are missing or which source files have changed since the last time the build was made. Although this is sufficient for the majority of projects, it does become a problem for some large projects.

Assume that you make a change to a base class animal.java, which will affect the super classes, dog.java and cat.java, from functioning correctly; maybe an interface change or a method signature change. Using the standard compilation procedures, only animal.java would be compiled, and the other two classes would be left untouched. This might result in run-time errors ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.