|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.api.internal.ConventionTask org.gradle.api.tasks.Exec
public class Exec extends ConventionTask
Executes a command line process. Example:
task stopTomcat(type:Exec) { workingDir '../tomcat/bin' //on windows: commandLine 'cmd', '/c', 'stop.bat' //on linux commandLine './stop.sh' //store the output instead of printing to the console: standardOutput = new ByteArrayOutputStream() //extension method stopTomcat.output() can be used to obtain the output: ext.output = { return standardOutput.toString() } }
Constructor Summary | |
Exec()
|
Method Summary | |
---|---|
Exec
|
args(Object... args)
{@inheritDoc} |
ExecSpec
|
args(Iterable args)
{@inheritDoc} |
Exec
|
commandLine(Object... arguments)
{@inheritDoc} |
ExecSpec
|
commandLine(Iterable args)
{@inheritDoc} |
Exec
|
copyTo(ProcessForkOptions target)
{@inheritDoc} |
Exec
|
environment(String name, Object value)
{@inheritDoc} |
Exec
|
environment(Map environmentVariables)
{@inheritDoc} |
Exec
|
executable(Object executable)
{@inheritDoc} |
List
|
getArgs()
{@inheritDoc} |
List
|
getCommandLine()
{@inheritDoc} |
Map
|
getEnvironment()
{@inheritDoc} |
OutputStream
|
getErrorOutput()
{@inheritDoc} |
ExecResult
|
getExecResult()
Returns the result for the command run by this task. |
String
|
getExecutable()
{@inheritDoc} |
InputStream
|
getStandardInput()
{@inheritDoc} |
OutputStream
|
getStandardOutput()
{@inheritDoc} |
File
|
getWorkingDir()
{@inheritDoc} |
boolean
|
isIgnoreExitValue()
{@inheritDoc} |
Exec
|
setArgs(Iterable arguments)
{@inheritDoc} |
void
|
setCommandLine(Iterable args)
{@inheritDoc} |
void
|
setCommandLine(Object... args)
{@inheritDoc} |
void
|
setEnvironment(Map environmentVariables)
{@inheritDoc} |
Exec
|
setErrorOutput(OutputStream outputStream)
{@inheritDoc} |
void
|
setExecutable(Object executable)
{@inheritDoc} |
ExecSpec
|
setIgnoreExitValue(boolean ignoreExitValue)
{@inheritDoc} |
Exec
|
setStandardInput(InputStream inputStream)
{@inheritDoc} |
Exec
|
setStandardOutput(OutputStream outputStream)
{@inheritDoc} |
void
|
setWorkingDir(Object dir)
{@inheritDoc} |
Exec
|
workingDir(Object dir)
{@inheritDoc} |
Constructor Detail |
---|
public Exec()
Method Detail |
---|
public Exec args(Object... args)
public ExecSpec args(Iterable args)
public Exec commandLine(Object... arguments)
public ExecSpec commandLine(Iterable args)
public Exec copyTo(ProcessForkOptions target)
public Exec environment(String name, Object value)
public Exec environment(Map environmentVariables)
public Exec executable(Object executable)
public List getArgs()
public List getCommandLine()
public Map getEnvironment()
public OutputStream getErrorOutput()
public ExecResult getExecResult()
public String getExecutable()
public InputStream getStandardInput()
public OutputStream getStandardOutput()
public File getWorkingDir()
public boolean isIgnoreExitValue()
public Exec setArgs(Iterable arguments)
public void setCommandLine(Iterable args)
public void setCommandLine(Object... args)
public void setEnvironment(Map environmentVariables)
public Exec setErrorOutput(OutputStream outputStream)
public void setExecutable(Object executable)
public ExecSpec setIgnoreExitValue(boolean ignoreExitValue)
public Exec setStandardInput(InputStream inputStream)
public Exec setStandardOutput(OutputStream outputStream)
public void setWorkingDir(Object dir)
public Exec workingDir(Object dir)
Gradle API 1.12