当前位置: 首页>>代码示例>>Java>>正文


Java LogOutputStream类代码示例

本文整理汇总了Java中org.apache.commons.exec.LogOutputStream的典型用法代码示例。如果您正苦于以下问题:Java LogOutputStream类的具体用法?Java LogOutputStream怎么用?Java LogOutputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LogOutputStream类属于org.apache.commons.exec包,在下文中一共展示了LogOutputStream类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runMavenCommand

import org.apache.commons.exec.LogOutputStream; //导入依赖的package包/类
@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);
}
 
开发者ID:nodevops,项目名称:confd-maven-plugin,代码行数:27,代码来源:MavenRunnerStepdefs.java

示例2: configure

import org.apache.commons.exec.LogOutputStream; //导入依赖的package包/类
@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);
}
 
开发者ID:mobilecashout,项目名称:osprey,代码行数:12,代码来源:MainModule.java

示例3: LocalShellAction

import org.apache.commons.exec.LogOutputStream; //导入依赖的package包/类
public LocalShellAction(CommandLine commandLine, LogOutputStream logOutputStream) {
    this.commandLine = commandLine;
    this.logOutputStream = logOutputStream;
}
 
开发者ID:mobilecashout,项目名称:osprey,代码行数:5,代码来源:LocalShellAction.java


注:本文中的org.apache.commons.exec.LogOutputStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。