open class Exec : AbstractExecTask<AbstractExecTask<*>>
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() } }
Exec() |
open fun args(vararg args: Any): T open fun args(args: MutableIterable<*>): T
{@inheritDoc} |
|
open fun commandLine(vararg arguments: Any): T open fun commandLine(args: MutableIterable<*>): T
{@inheritDoc} |
|
open fun copyTo(target: ProcessForkOptions): T
{@inheritDoc} |
|
open fun environment(name: String, value: Any): T open fun environment(environmentVariables: MutableMap<String, *>): T
{@inheritDoc} |
|
open fun executable(executable: Any): T
{@inheritDoc} |
|
open fun getArgs(): MutableList<String>
{@inheritDoc} |
|
open fun getArgumentProviders(): MutableList<CommandLineArgumentProvider>
{@inheritDoc} |
|
open fun getCommandLine(): MutableList<String>
{@inheritDoc} |
|
open fun getEnvironment(): MutableMap<String, Any>
{@inheritDoc} |
|
open fun getErrorOutput(): OutputStream
{@inheritDoc} |
|
open fun getExecResult(): ExecResult
Returns the result for the command run by this task. Returns |
|
open fun getExecutable(): String
{@inheritDoc} |
|
open fun getStandardInput(): InputStream
{@inheritDoc} |
|
open fun getStandardOutput(): OutputStream
{@inheritDoc} |
|
open fun getWorkingDir(): File
{@inheritDoc} |
|
open fun isIgnoreExitValue(): Boolean
{@inheritDoc} |
|
open fun setArgs(arguments: MutableList<String>): T open fun setArgs(arguments: MutableIterable<*>): T
{@inheritDoc} |
|
open fun setCommandLine(args: MutableList<String>): Unit open fun setCommandLine(args: MutableIterable<*>): Unit open fun setCommandLine(vararg args: Any): Unit
{@inheritDoc} |
|
open fun setEnvironment(environmentVariables: MutableMap<String, *>): Unit
{@inheritDoc} |
|
open fun setErrorOutput(outputStream: OutputStream): T
{@inheritDoc} |
|
open fun setExecutable(executable: String): Unit open fun setExecutable(executable: Any): Unit
{@inheritDoc} |
|
open fun setIgnoreExitValue(ignoreExitValue: Boolean): T
{@inheritDoc} |
|
open fun setStandardInput(inputStream: InputStream): T
{@inheritDoc} |
|
open fun setStandardOutput(outputStream: OutputStream): T
{@inheritDoc} |
|
open fun setWorkingDir(dir: File): Unit open fun setWorkingDir(dir: Any): Unit
{@inheritDoc} |
|
open fun workingDir(dir: Any): T
{@inheritDoc} |