To the search engines of the future:
What worked for me:
<fileset dir="target"> <include name="*/"/> <exclude name="big_and_complex_dir/"/> </fileset>
This removed everything (all files and directories) below target/ except target/big_and_complex_dir .
My goal was to avoid unnecessary directory big_and_complex_dir , which took a lot of time in the case of " big_and_complex_dir ".
It seems that the interpretation of the ant file set has non-trivial, non-intuitive behavior, we need to close the include / exclude path with / if we also intend to perform the operations of the recursive subdirectory.
peterh
source share