Maven Clean now deletes '' directories if it finds any. Furthermore,
AsynchronousFileCacheBackingTestSupport now not just deletes directory
contents but also removes the empty corresponding directories
afterwards.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
<fileset>
<directory>.</directory>
<includes>
+ <!-- AspectJ core dumps -->
<include>**/ajcore.*.txt</include>
+ <!-- Test temp-dirs in 'weaver' module, see AsynchronousFileCacheBackingTestSupport.getCacheDir -->
+ <include>**/dir-0.*/**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
protected void cleanupCache() {
if (indexFile != null) {
if (FileUtil.deleteContents(indexFile) > 0) {
- System.out.println("Deleted " + indexFile);
+ System.out.println("Deleted index file: " + indexFile);
}
indexFile = null;
}
if (cacheDir != null) {
if (FileUtil.deleteContents(cacheDir) > 0) {
- System.out.println("Deleted " + cacheDir);
+ System.out.println("Deleted cache directory content: " + cacheDir);
+ }
+ if (cacheDir.delete()) {
+ System.out.println("Deleted cache directory: " + cacheDir);
}
cacheDir = null;
}