A
Andreas Leitgeb
I would like to delete all contents(files&dirs) of a certain directory
except those CVS subdirectories.
My attempts so far:
<delete dir="${build.dir}/classes">
purges the whole folder, without exceptions.
<delete><fileset dir="${build.dir}/classes" excludes="**/CVS"/></delete>
purges only files, leaves empty directory structures behind
(corresponding to the package-structure - not CVS-aware).
Btw.: yes, that "excludes" is redundant, since CVS is already in the
default-excludes.
Is there some <dirset> or <pathset> or is there some extra tag/option for
fileset to also include directories?
I didn't find such in the printed ANT-book.
PS:
It may look weird, why - when using CVS - I'd have an empty CVS-aware
directory in the first place, but that just happens, when there have
been checked-in files there in the past, but no longer nowadays.
I don't think my problem is really CVS-specific. While I could
find CVS-specific solutions for my specific problem, it still
doesn't answer the general question of deleting files and subfolders
while honouring exceptions.
except those CVS subdirectories.
My attempts so far:
<delete dir="${build.dir}/classes">
purges the whole folder, without exceptions.
<delete><fileset dir="${build.dir}/classes" excludes="**/CVS"/></delete>
purges only files, leaves empty directory structures behind
(corresponding to the package-structure - not CVS-aware).
Btw.: yes, that "excludes" is redundant, since CVS is already in the
default-excludes.
Is there some <dirset> or <pathset> or is there some extra tag/option for
fileset to also include directories?
I didn't find such in the printed ANT-book.
PS:
It may look weird, why - when using CVS - I'd have an empty CVS-aware
directory in the first place, but that just happens, when there have
been checked-in files there in the past, but no longer nowadays.
I don't think my problem is really CVS-specific. While I could
find CVS-specific solutions for my specific problem, it still
doesn't answer the general question of deleting files and subfolders
while honouring exceptions.