void (@NotNull final ProgressIndicator indicator) { try { TargetedCommandLineBuilder builder = javaParameters.toCommandLine(request); TargetEnvironment environment = request.prepareEnvironment(TargetProgressIndicator.EMPTY); TargetedCommandLine commandLine = builder.build(); messageView.setBuildCommandLine(commandLine.getCommandPresentation(environment)); ProcessHandler handler = runBuild(indicator, messageView, buildFile, listenerWrapper, commandLine, environment); future.complete(handler); if (waitFor && handler != null) { handler.waitFor(); } } catch (Throwable e) { LOG.error(e); listenerWrapper.buildFinished(AntBuildListener.FAILED_TO_RUN, 0); } }