How to fail on pathelement not exists in apache ant?
问题 I have a really long class path using a <path /> section. On a different machine, lots of the jars dont exist. How can I check the pathelements all exist? 回答1: Use the present selector : <project> <fileset dir="/home/rosebud/temp/dir1" includes="*.jar" id="srcfileset"> <present present="srconly" targetdir="/home/rosebud/temp/dir2"/> </fileset> <echo>Missing files => ${toString:srcfileset}</echo> </project> echoes all files only present in /home/rosebud/temp/dir1 If all files from /home