}
String name = dirOrJar.getName();
if (!dirOrJar.isDirectory()
&& (name.endsWith(".war") || name.endsWith(".jar") || name.endsWith(".zip"))) {
return new OutputFileSetOnJar(dirOrJar, jarPathPrefix);
} else {
Util.recursiveDelete(new File(dirOrJar, dirPathPrefix), true);
return new OutputFileSetOnDirectory(dirOrJar, dirPathPrefix);
}
}