/*
* Hijack Ant's ZipScanner to handle inclusions/exclusions exactly as Ant
* does. We're only using its pattern-matching capabilities; the code path
* I'm using never tries to hit the filesystem in Ant 1.6.5.
*/
final ZipScanner scanner = new ZipScanner();
if (includeList.length > 0) {
scanner.setIncludes(includeList);
}
if (excludeList.length > 0) {
scanner.setExcludes(excludeList);
}
if (defaultExcludes) {
scanner.addDefaultExcludes();
}
scanner.setCaseSensitive(caseSensitive);
scanner.init();
// index from this package down
publicPathEntries.addRootPackage(publicPackage, new FileFilter() {
public boolean accept(String name) {
return scanner.match(name);
}
});
}