Set<String> errorBatches = Sets.create();
boolean succeeded = true;
try {
ResourceRepository scanner = getScanner(new File(scanPath));
Cursor cursor = scanner.createCursor();
try {
while (cursor.next()) {
Location location = cursor.getLocation();
Class<? extends BatchDescription> batchDescription = getBatchDescription(location);
if (batchDescription == null) {
continue;
}
boolean singleSucceeded = BatchCompilerDriver.compile(
outputDirectory,
batchDescription,
packageName,
hadoopWorkLocation,
compilerWorkDirectory,
linkingResources,
pluginLocations);
succeeded &= singleSucceeded;
if (singleSucceeded == false) {
errorBatches.add(toClassName(location));
if (skipError == false) {
break;
}
}
}
} finally {
cursor.close();
}
} catch (Exception e) {
LOG.error(MessageFormat.format(
"バッチクラスの検索に失敗しました ({0})",
scanPath),