I have a fileset
element in a build file that is defined as:
<fileset id="fileset" basedir=".">
<include name="test.txt"/>
<include name="missing.txt"/>
</fileset>
When this runs (as part of a copy task), it does not complain if any of the files are missing. Whilst I can use failonempty="true"
in the fileset
element, this only fails if both files are missing.
I can achieve this by making multiple filesets with failonempty="true"
set, each one containing a single file, but this feels clunky. This is also a maintenance problem if there are lots of required files.
Is there any way of making nant complain if any of the files in the fileset are missing? If this is not possible, is there another way of achieving the same effect?