private static boolean doRunTask(CompileContext context, List<MavenRunnerParameters> parametersList) {
    try {
      var runner = DefaultJavaProgramRunner.getInstance();
      Executor executor = DefaultRunExecutor.getRunExecutorInstance();

      long executionId = ExecutionEnvironment.getNextUnusedExecutionId();
      int count = 0;
      for (MavenRunnerParameters params : parametersList) {
        RunnerAndConfigurationSettings configuration =
          MavenRunConfigurationType.createRunnerAndConfigurationSettings(null, null, params, context.getProject());
        if (parametersList.size() > 1) {
          configuration
            .setName(MavenProjectBundle.message("maven.before.build.of.count", ++count, parametersList.size(), configuration.getName()));
        }
        ExecutionEnvironment environment = new ExecutionEnvironment(executor, runner, configuration, context.getProject());
        environment.setExecutionId(executionId);
        boolean result = RunConfigurationBeforeRunProvider.doRunTask(executor.getId(), environment, runner);
        if (!result) return false;
      }

      return true;
    }
    catch (ProcessCanceledException e) {
      throw e;
    }
    catch (Exception e) {
      MavenLog.LOG.error("Cannot execute:", e);
      return false;
    }
  }
private static boolean doRunTask(CompileContext context, List<MavenRunnerParameters> parametersList)