System.err.println("run lenskit-eval --help for more information");
System.exit(1);
}
logger.info("loading evaluation from {}", f);
try {
EvalProject project = engine.loadProject(f);
if (options.getArgs().length == 0) {
String dft = project.getDefaultTarget();
if (dft == null && !project.getAntProject().getTargets().isEmpty()) {
String targets = Joiner.on(", ")
.join(Iterables.transform(
project.getAntProject().getTargets().keySet(),
new Function<Object,Object>() {
@Nullable
@Override
public Object apply(@Nullable Object input) {
return input == null ? null : input;
}
}));
logger.error("No targets specified and no default provided (try one of: {})",
targets);
System.exit(2);
}
project.executeTarget(dft);
} else {
project.executeTargets(options.getArgs());
}
} catch (TaskExecutionException e) {
// we handle these specially
reportError(e.getCause(), "%s: %s", f.getPath(), e.getMessage());
} catch (IOException e) {