String link = cmd.getOptionValue(OPT_LINK.getOpt());
String plugin = cmd.getOptionValue(OPT_PLUGIN.getOpt());
boolean skipError = cmd.hasOption(OPT_SKIPERROR.getOpt());
File outputDirectory = new File(output);
Location hadoopWorkLocation = Location.fromPath(hadoopWork, '/');
File compilerWorkDirectory = new File(compilerWork);
List<File> linkingResources = Lists.create();
if (link != null) {
for (String s : link.split(File.pathSeparator)) {
linkingResources.add(new File(s));
}
}
List<URL> pluginLocations = Lists.create();
if (plugin != null) {
for (String s : plugin.split(File.pathSeparator)) {
if (s.trim().isEmpty()) {
continue;
}
try {
File file = new File(s);
if (file.exists() == false) {
throw new FileNotFoundException(file.getAbsolutePath());
}
URL url = file.toURI().toURL();
pluginLocations.add(url);
} catch (IOException e) {
LOG.warn(MessageFormat.format(
"プラグイン{0}をロードできませんでした",
s),
e);
}
}
}
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(