process = commandLine.createProcess();
} catch (ExecutionException e) {
throw new ProjectBuildException("Failed to run rebar", e);
}
BaseOSProcessHandler handler = new BaseOSProcessHandler(process, commandLine.getCommandLineString(), Charset.defaultCharset());
ProcessAdapter adapter = new ErlangCompilerProcessAdapter(context, NAME, commandLine.getWorkDirectory().getPath()); //TODO provide rebar messages handling
handler.addProcessListener(adapter);
handler.startNotify();
handler.waitFor();
}