Created
February 22, 2012 13:32
-
-
Save kdabir/1885185 to your computer and use it in GitHub Desktop.
executing system process with groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// following process executes 'mvn compile' from a groovy script | |
// it can be replaced with any system program | |
Process compile = "cmd /c mvn compile".execute() // 'cmd /c' works only on win platform | |
compile.waitForProcessOutput(out, err) | |
if (out) println "out:\n$out" | |
if (err) println "err:\n$err" | |
exitValue = compile.exitValue() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment