I need an Apache Ant target that deletes all files in a directory but does not touch subdirectories.
In my current approach I have to explicitly name the subdirectories I want to skip (atm just "src/").
<delete>
<fileset dir="${dist.dir}" excludes="src/" />
</delete>
But I don't like it. That way I would have to modify the target everytime something changes in the subdirectory structure.
Any ideas?