Java 类org.apache.commons.exec.LogOutputStream 实例源码

项目:confd-maven-plugin    文件:MavenRunnerStepdefs.java   
@When("I run maven with args: (.*)")
public void runMavenCommand(List<String> mvnArgs) throws IOException {
    this.mvnArgs.addAll(mvnArgs);
    System.out.println("Launching Maven with args <" + Joiner.on(" ").join(mvnArgs) + ">");
    CommandLine cmdLine = new CommandLine(getCommandLine());
    for (String mvnArg : mvnArgs) {
        cmdLine.addArgument(mvnArg);
    }
    if (confdForCucumberLocation != null) {
        cmdLine.addArgument("-Dcucumber.confd.binary.path=" + confdForCucumberLocation);
    }
    DefaultExecutor executor = new DefaultExecutor();
    if (projectRootAsFile != null) {
        executor.setWorkingDirectory(projectRootAsFile);
    }
    executor.setExitValue(expectedExitCode);
    executor.setStreamHandler(new PumpStreamHandler(new LogOutputStream() {
        @Override
        protected void processLine(String line, int level) {
            System.out.println(line);
            executorOutput.add(line);
        }
    }));
    exitCode = executor.execute(cmdLine, environment);
    fullOutput = Joiner.on(LINE_SEPARATOR).join(executorOutput);
}
项目:osprey    文件:MainModule.java   
@Override
public void configure(Binder binder) {
    binder.bind(Osprey.class).in(Singleton.class);
    binder.bind(Commander.class).toProvider(CommanderProvider.class).in(Singleton.class);
    binder.bind(DeployCommand.class).in(Singleton.class);
    binder.bind(Logger.class).toProvider(LoggerProvider.class).in(Singleton.class);
    binder.bind(DeploymentPlanManager.class).toProvider(DeploymentPlanManagerProvider.class).in(Singleton.class);
    binder.bind(LogOutputStream.class).to(LogOutputStreamImpl.class).in(Singleton.class);
    binder.bind(PluginManager.class).toProvider(PluginManagerProvider.class).in(Singleton.class);
    binder.bind(ProjectActionPlanner.class).in(Singleton.class);
}
项目:osprey    文件:LocalShellAction.java   
public LocalShellAction(CommandLine commandLine, LogOutputStream logOutputStream) {
    this.commandLine = commandLine;
    this.logOutputStream = logOutputStream;
}