String[] pathElements = sourcePath.list();
for (int i = 0; i < pathElements.length; i++) {
File dir = new File(pathElements[i]);
if (dir.isDirectory()) {
DirSet ds = new DirSet();
ds.setProject(getProject());
ds.setDefaultexcludes(useDefaultExcludes);
ds.setDir(dir);
ds.createPatternSet().addConfiguredPatternset(ps);
dirSets.addElement(ds);
} else {
log("Skipping " + pathElements[i]
+ " since it is no directory.", Project.MSG_WARN);
}
}
}
Enumeration<DirSet> e = dirSets.elements();
while (e.hasMoreElements()) {
DirSet ds = e.nextElement();
File baseDir = ds.getDir(getProject());
log("scanning " + baseDir + " for packages.", Project.MSG_DEBUG);
DirectoryScanner dsc = ds.getDirectoryScanner(getProject());
String[] dirs = dsc.getIncludedDirectories();
boolean containsPackages = false;
for (int i = 0; i < dirs.length; i++) {
// are there any java files in this directory?
File pd = new File(baseDir, dirs[i]);