Hey folks,

In a plugin, I need to execute a command, print command output to the build 
log in real time and return the command output to the caller.

First, I tried the following, but the problems is that there is no way to 
save command output.

ProcStarter = launcher.launch().cmds(args).envs(environment).pwd(workDir);

int status = proc.stdout(launcher.getListener().getLogger()).join();

Second, I tried 

ProcStarter = launcher.launch().cmds(args).envs(environment).pwd(workDir);  

ByteArrayOutputStream fos = new ByteArrayOutputStream(); 

int status = proc.stdout(fos).join();

But there is no way for me to print the cmd output to the build log in real 
time.

Any suggestions?

Thanks in advance!



-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to