According to the Ant 1.7.1 documentation, the javac task "forms an implicit FileSet and supports all attributes of <fileset> (dir becomes srcdir) as well as the nested <include>, <exclude> and <patternset> elements." The FileSet element has added the erroronmissingdir attribute in Ant 1.7.1, but it does not appear to be supported by the javac task. I believe this is a bug, and that <javac> should support this new attribute. At the very least, the current behavior does not match the documentation.
svn revision 772556 fixes the manual I haven't made up my mind on whether <javac> should support erroronmissingdir at all.
Ant Documentation 1.7.1: <zipfileset> supports all attributes of <fileset> in addition to those listed below. Unfortunately, <zipfileset> doesn't support erroronmissingdir
ZipFileSet does support erroronmissingdir (it comes in inherited from AbstractFileSet).
If javac is not going to support erroronmissingdir, then how *does* one tell javac to ignore a directory? The use case I've got is this: I have several components to compile, so I wrote a macrodef to do the compile. Some of the components have more than one src directory (e.g. src, gen/src), but others do not (just src, no gen/src). I want to put both src and gen/src on the javac srcdir and have it simply ignore a missing directory. I've tried various combinations of <src> and srcdir and <fileset> to no avail.