/*
* 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.
*/
ZipScanner scanner = new ZipScanner();
if (includeList.length > 0) {
scanner.setIncludes(includeList);
}
if (excludeList.length > 0 || skipList.length > 0) {
String[] excludeOrSkip = concatenate(excludeList, skipList);
scanner.setExcludes(excludeOrSkip);
}
if (defaultExcludes) {
scanner.addDefaultExcludes();
}
scanner.setCaseSensitive(caseSensitive);
scanner.init();
return scanner;
}