boolean (List<MavenRunnerParameters> commands, @Nullable MavenGeneralSettings coreSettings, @Nullable MavenRunnerSettings runnerSettings, @Nullable final String action, @Nullable ProgressIndicator indicator, @Nullable Consumer<? super ProcessHandler> onAttach, boolean isDelegateBuild) { if (commands.isEmpty()) return true; int count = 0; for (MavenRunnerParameters command : commands) { if (indicator != null) { indicator.setFraction(((double)count++) / commands.size()); indicator.setText(RunnerBundle.message("maven.running", action != null ? action : command.getWorkingDirPath())); indicator.setText2(command.getGoals().toString()); //NON-NLS } ProgramRunner.Callback callback = descriptor -> { ProcessHandler handler = descriptor.getProcessHandler(); if (handler != null) { handler.addProcessListener(new ProcessAdapter() { @Override public void startNotified(@NotNull ProcessEvent event) { if (onAttach != null) { onAttach.consume(handler); } } @Override public void processTerminated(@NotNull ProcessEvent event) { updateTargetFolders(); } }); } }; MavenRunConfigurationType.runConfiguration(myProject, command, null, null, callback, isDelegateBuild); } return true; }