Groovy Documentation

org.gradle.api.tasks
[Java] Class JavaExec

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.api.tasks.JavaExec
All Implemented Interfaces:
JavaExecSpec

public class JavaExec
extends ConventionTask

Executes a Java application in a child process.

The process can be started in debug mode (see getDebug()) in an ad-hoc manner by supplying the `--debug-jvm` switch when invoking the build.

 gradle someJavaExecTask --debug-jvm
 


Constructor Summary
JavaExec()

 
Method Summary
JavaExec args(Object... args)

{@inheritDoc}

JavaExecSpec args(Iterable args)

{@inheritDoc}

JavaExec bootstrapClasspath(Object... classpath)

{@inheritDoc}

JavaExec classpath(Object... paths)

{@inheritDoc}

JavaExec copyTo(JavaForkOptions options)

{@inheritDoc}

JavaExec copyTo(ProcessForkOptions target)

{@inheritDoc}

JavaExec environment(String name, Object value)

{@inheritDoc}

JavaExec environment(Map environmentVariables)

{@inheritDoc}

void exec()

JavaExec executable(Object executable)

{@inheritDoc}

List getAllJvmArgs()

{@inheritDoc}

List getArgs()

{@inheritDoc}

FileCollection getBootstrapClasspath()

{@inheritDoc}

FileCollection getClasspath()

{@inheritDoc}

List getCommandLine()

{@inheritDoc}

boolean getDebug()

{@inheritDoc}

String getDefaultCharacterEncoding()

{@inheritDoc}

boolean getEnableAssertions()

{@inheritDoc}

Map getEnvironment()

{@inheritDoc}

OutputStream getErrorOutput()

{@inheritDoc}

String getExecutable()

{@inheritDoc}

List getJvmArgs()

{@inheritDoc}

String getMain()

{@inheritDoc}

String getMaxHeapSize()

{@inheritDoc}

String getMinHeapSize()

{@inheritDoc}

InputStream getStandardInput()

{@inheritDoc}

OutputStream getStandardOutput()

{@inheritDoc}

Map getSystemProperties()

{@inheritDoc}

File getWorkingDir()

{@inheritDoc}

boolean isIgnoreExitValue()

{@inheritDoc}

JavaExec jvmArgs(Iterable arguments)

{@inheritDoc}

JavaExec jvmArgs(Object... arguments)

{@inheritDoc}

void setAllJvmArgs(Iterable arguments)

{@inheritDoc}

JavaExec setArgs(Iterable applicationArgs)

{@inheritDoc}

void setBootstrapClasspath(FileCollection classpath)

{@inheritDoc}

JavaExec setClasspath(FileCollection classpath)

{@inheritDoc}

void setDebug(boolean enabled)

{@inheritDoc}

void setDefaultCharacterEncoding(String defaultCharacterEncoding)

{@inheritDoc}

void setEnableAssertions(boolean enabled)

{@inheritDoc}

void setEnvironment(Map environmentVariables)

{@inheritDoc}

JavaExec setErrorOutput(OutputStream outputStream)

{@inheritDoc}

void setExecutable(Object executable)

{@inheritDoc}

JavaExecSpec setIgnoreExitValue(boolean ignoreExitValue)

{@inheritDoc}

void setJvmArgs(Iterable arguments)

{@inheritDoc}

JavaExec setMain(String mainClassName)

{@inheritDoc}

void setMaxHeapSize(String heapSize)

{@inheritDoc}

void setMinHeapSize(String heapSize)

{@inheritDoc}

JavaExec setStandardInput(InputStream inputStream)

{@inheritDoc}

JavaExec setStandardOutput(OutputStream outputStream)

{@inheritDoc}

void setSystemProperties(Map properties)

{@inheritDoc}

void setWorkingDir(Object dir)

{@inheritDoc}

JavaExec systemProperties(Map properties)

{@inheritDoc}

JavaExec systemProperty(String name, Object value)

{@inheritDoc}

JavaExec workingDir(Object dir)

{@inheritDoc}

 

Constructor Detail

JavaExec

public JavaExec()


 
Method Detail

args

public JavaExec args(Object... args)
{@inheritDoc}


args

public JavaExecSpec args(Iterable args)
{@inheritDoc}


bootstrapClasspath

public JavaExec bootstrapClasspath(Object... classpath)
{@inheritDoc}


classpath

public JavaExec classpath(Object... paths)
{@inheritDoc}


copyTo

public JavaExec copyTo(JavaForkOptions options)
{@inheritDoc}


copyTo

public JavaExec copyTo(ProcessForkOptions target)
{@inheritDoc}


environment

public JavaExec environment(String name, Object value)
{@inheritDoc}


environment

public JavaExec environment(Map environmentVariables)
{@inheritDoc}


exec

@TaskAction
public void exec()


executable

public JavaExec executable(Object executable)
{@inheritDoc}


getAllJvmArgs

public List getAllJvmArgs()
{@inheritDoc}


getArgs

public List getArgs()
{@inheritDoc}


getBootstrapClasspath

@InputFiles
public FileCollection getBootstrapClasspath()
{@inheritDoc}


getClasspath

@InputFiles
public FileCollection getClasspath()
{@inheritDoc}


getCommandLine

public List getCommandLine()
{@inheritDoc}


getDebug

public boolean getDebug()
{@inheritDoc}


getDefaultCharacterEncoding

public String getDefaultCharacterEncoding()
{@inheritDoc}


getEnableAssertions

public boolean getEnableAssertions()
{@inheritDoc}


getEnvironment

public Map getEnvironment()
{@inheritDoc}


getErrorOutput

public OutputStream getErrorOutput()
{@inheritDoc}


getExecutable

public String getExecutable()
{@inheritDoc}


getJvmArgs

public List getJvmArgs()
{@inheritDoc}


getMain

public String getMain()
{@inheritDoc}


getMaxHeapSize

public String getMaxHeapSize()
{@inheritDoc}


getMinHeapSize

public String getMinHeapSize()
{@inheritDoc}


getStandardInput

public InputStream getStandardInput()
{@inheritDoc}


getStandardOutput

public OutputStream getStandardOutput()
{@inheritDoc}


getSystemProperties

public Map getSystemProperties()
{@inheritDoc}


getWorkingDir

public File getWorkingDir()
{@inheritDoc}


isIgnoreExitValue

public boolean isIgnoreExitValue()
{@inheritDoc}


jvmArgs

public JavaExec jvmArgs(Iterable arguments)
{@inheritDoc}


jvmArgs

public JavaExec jvmArgs(Object... arguments)
{@inheritDoc}


setAllJvmArgs

public void setAllJvmArgs(Iterable arguments)
{@inheritDoc}


setArgs

public JavaExec setArgs(Iterable applicationArgs)
{@inheritDoc}


setBootstrapClasspath

public void setBootstrapClasspath(FileCollection classpath)
{@inheritDoc}


setClasspath

public JavaExec setClasspath(FileCollection classpath)
{@inheritDoc}


setDebug

@Option(option = "debug-jvm", description = "Enable debugging for the process. The process is started suspended and listening on port 5005. [INCUBATING]")
public void setDebug(boolean enabled)
{@inheritDoc}


setDefaultCharacterEncoding

public void setDefaultCharacterEncoding(String defaultCharacterEncoding)
{@inheritDoc}


setEnableAssertions

public void setEnableAssertions(boolean enabled)
{@inheritDoc}


setEnvironment

public void setEnvironment(Map environmentVariables)
{@inheritDoc}


setErrorOutput

public JavaExec setErrorOutput(OutputStream outputStream)
{@inheritDoc}


setExecutable

public void setExecutable(Object executable)
{@inheritDoc}


setIgnoreExitValue

public JavaExecSpec setIgnoreExitValue(boolean ignoreExitValue)
{@inheritDoc}


setJvmArgs

public void setJvmArgs(Iterable arguments)
{@inheritDoc}


setMain

public JavaExec setMain(String mainClassName)
{@inheritDoc}


setMaxHeapSize

public void setMaxHeapSize(String heapSize)
{@inheritDoc}


setMinHeapSize

public void setMinHeapSize(String heapSize)
{@inheritDoc}


setStandardInput

public JavaExec setStandardInput(InputStream inputStream)
{@inheritDoc}


setStandardOutput

public JavaExec setStandardOutput(OutputStream outputStream)
{@inheritDoc}


setSystemProperties

public void setSystemProperties(Map properties)
{@inheritDoc}


setWorkingDir

public void setWorkingDir(Object dir)
{@inheritDoc}


systemProperties

public JavaExec systemProperties(Map properties)
{@inheritDoc}


systemProperty

public JavaExec systemProperty(String name, Object value)
{@inheritDoc}


workingDir

public JavaExec workingDir(Object dir)
{@inheritDoc}


 

Gradle API 1.12