public final void execute(String args, Map<String, String> environment) throws TaskRunnerException { final List<String> arguments = getArguments(args); logger.info("Running " + taskToString(taskName, arguments) + " in " + config.getWorkingDirectory()); try { final int result = new YarnExecutor(config, arguments, environment).executeAndRedirectOutput(logger); if (result != 0) { throw new TaskRunnerException( taskToString(taskName, arguments) + " failed. (error code " + result + ")"); } } catch (ProcessExecutionException e) { throw new TaskRunnerException(taskToString(taskName, arguments) + " failed.", e); } }
@Override public void execute() throws MojoFailureException { if (testFailureIgnore && !isTestingPhase()) { getLog().info("testFailureIgnore property is ignored in non test phases"); } if (!(skipTestPhase() || skipExecution())) { if (installDirectory == null) { installDirectory = workingDirectory; } try { execute(new FrontendPluginFactory(workingDirectory, installDirectory, new RepositoryCacheResolver(repositorySystemSession))); } catch (TaskRunnerException e) { if (testFailureIgnore && isTestingPhase()) { getLog().error("There are test failures.\nFailed to run task: " + e.getMessage(), e); } else { throw new MojoFailureException("Failed to run task", e); } } catch (FrontendException e) { throw MojoUtils.toMojoFailureException(e); } } else { getLog().info("Skipping execution."); } }
@Override public void execute() throws MojoFailureException { if (testFailureIgnore && !isTestingPhase()) { getLog().info("testFailureIgnore property is ignored in non test phases"); } if (!(skipTestPhase() || skipExecution())) { if (installDirectory == null) { installDirectory = workingDirectory; } try { execute(new FrontendPluginFactory(workingDirectory, installDirectory, new RepositoryCacheResolver(repositorySystemSession))); } catch (TaskRunnerException e) { if (testFailureIgnore && isTestingPhase()) { getLog().error("There are test failures.\nFailed to run task: " + e.getMessage(), e); } else { throw new MojoFailureException("Failed to run task", e); } } catch (FrontendException e) { throw MojoUtils.toMojoFailureException(e); } } else { getLog().info("Skipping execution."); } }
public final void execute(String args, Map<String, String> environment) throws TaskRunnerException { final String absoluteTaskLocation = getAbsoluteTaskLocation(); final List<String> arguments = getArguments(args); logger.info("Running " + taskToString(taskName, arguments) + " in " + config.getWorkingDirectory()); try { final int result = new NodeExecutor(config, prepend(absoluteTaskLocation, arguments), environment).executeAndRedirectOutput(logger); if (result != 0) { throw new TaskRunnerException(taskToString(taskName, arguments) + " failed. (error code " + result + ")"); } } catch (ProcessExecutionException e) { throw new TaskRunnerException(taskToString(taskName, arguments) + " failed.", e); } }