}
// We don't want the normal logging crap; just the coiler messages.
initLogging();
BpelCompileCommand bcc = new BpelCompileCommand();
if (OUTPUT_DIR.isSet()) {
String outputDir = OUTPUT_DIR.getValue();
File od = new File(outputDir);
if (!od.exists() || !od.isDirectory()) {
consoleErr(outputDir + ": no such directory or not writable.");
System.exit(-1);
}
bcc.setOuputDirectory(od);
}
if (ROOT_WSDL.isSet()) {
bcc.setWsdlImportUri(ROOT_WSDL.getValue());
}
String[] b = BPEL_URLS.getValues();
if (b == null || b.length == 0) {
consoleErr("At least one process must be specified.");
System.exit(-1);
}
for (String aB : b) bcc.addBpelProcessUrl(aB);
try {
bcc.execute(new ClineCommandContext(__log));
} catch (ExecutionException ee) {
consoleErr(ee.getMessage());
System.exit(-1);
} catch (Throwable t) {
// This is really quite unexpected, so we should