From 0afe39c8f7545dbcb662c04a2cab1ae08ae63ed4 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
+If you wish to compile only files explicitly specified and disable +javac's default searching mechanism then you can unset the sourcepath +attribute: +
<javac sourcepath="" srcdir="${src}" + destdir="${build}" > + <include name="**/*.java" /> + <exclude name="**/Example.java" /> + </javac>+That way the javac will compile all java source files under "${src}" +directory but skip the examples. The compiler will even produce errors if some of +the non-example files refers to them. + +
Note: If you are using Ant on Windows and a new DOS window pops up for every use of an external compiler, this may be a problem of the JDK you are using. This problem may occur with all JDKs < 1.2.