org.apache.hadoop.maven.plugin.util
Class Exec
java.lang.Object
org.apache.hadoop.maven.plugin.util.Exec
public class Exec
- extends Object
Exec is a helper class for executing an external process from a mojo.
|
Constructor Summary |
Exec(org.apache.maven.plugin.Mojo mojo)
Creates a new Exec instance for executing an external process from the given
mojo. |
|
Method Summary |
int |
run(List<String> command,
List<String> output)
Runs the specified command and saves each line of the command's output to
the given list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Exec
public Exec(org.apache.maven.plugin.Mojo mojo)
- Creates a new Exec instance for executing an external process from the given
mojo.
- Parameters:
mojo - Mojo executing external process
run
public int run(List<String> command,
List<String> output)
- Runs the specified command and saves each line of the command's output to
the given list.
- Parameters:
command - List containing command and all argumentsoutput - List in/out parameter to receive command output
- Returns:
- int exit code of command
Copyright © 2014 Apache Software Foundation. All Rights Reserved.