<dependset>

The <dependset> task is used to delete a set of files (target files) if any of a set of source files is more recently modified than any of the target files. So, for example, you could set up a dependency between the build file and a set of target class files to prevent changes in the build file from not being reflected in the class files.

Nested Elements

There are no attributes to set, but the <dependset> task must contain at least one nested <srcfileset>/<srcfilelist> and one nested <targetfileset>/<targetfilelist>. As you’d expect, the srcfileset and srcfilelist elements are used to specify the source files. Equivalently, the targetfileset and targetfilelist elements are used to specify the target files.

Note that in the case ...

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.