use of org.mycore.frontend.cli.MCRExternalProcess in project mycore by MyCoRe-Org.
the class MCRBibUtilsTransformer method export.
private MCRContent export(File modsFile) {
String[] arguments = buildCommandArguments(modsFile);
MCRExternalProcess ep = null;
try {
ep = new MCRExternalProcess(arguments);
ep.run();
String errors = ep.getErrors();
if (!errors.isEmpty())
LOGGER.warn(errors);
return ep.getOutput();
} catch (Exception ex) {
String msg = "Exception invoking external command " + command;
throw new MCRException(msg, ex);
}
}
Aggregations