BaseExecSpec
, JavaForkOptions
, ProcessForkOptions
JavaExec
, RhinoShellExec
public interface JavaExecSpec extends JavaForkOptions, BaseExecSpec
Modifier and Type | Method | Description |
---|---|---|
JavaExecSpec |
args(Iterable<?> args) |
Adds args for the main class to be executed.
|
JavaExecSpec |
args(Object... args) |
Adds args for the main class to be executed.
|
JavaExecSpec |
classpath(Object... paths) |
Adds elements to the classpath for executing the main class.
|
List<String> |
getArgs() |
Returns the arguments passed to the main class to be executed.
|
List<CommandLineArgumentProvider> |
getArgumentProviders() |
Argument providers for the application.
|
FileCollection |
getClasspath() |
Returns the classpath for executing the main class.
|
String |
getMain() |
Returns the fully qualified name of the Main class to be executed.
|
Property<String> |
getMainClass() |
The fully qualified name of the Main class to be executed.
|
Property<String> |
getMainModule() |
The name of the main module to be executed if the application should run as a Java module.
|
ModularitySpec |
getModularity() |
Returns the module path handling for executing the main class.
|
JavaExecSpec |
setArgs(Iterable<?> args) |
Sets the args for the main class to be executed.
|
JavaExecSpec |
setArgs(List<String> args) |
Sets the args for the main class to be executed.
|
JavaExecSpec |
setClasspath(FileCollection classpath) |
Sets the classpath for executing the main class.
|
JavaExecSpec |
setMain(String main) |
Sets the fully qualified name of the main class to be executed.
|
getCommandLine, getErrorOutput, getStandardInput, getStandardOutput, isIgnoreExitValue, setErrorOutput, setIgnoreExitValue, setStandardInput, setStandardOutput
bootstrapClasspath, copyTo, debugOptions, getAllJvmArgs, getBootstrapClasspath, getDebug, getDebugOptions, getDefaultCharacterEncoding, getEnableAssertions, getJvmArgs, getJvmArgumentProviders, getMaxHeapSize, getMinHeapSize, getSystemProperties, jvmArgs, jvmArgs, setAllJvmArgs, setAllJvmArgs, setBootstrapClasspath, setDebug, setDefaultCharacterEncoding, setEnableAssertions, setJvmArgs, setJvmArgs, setMaxHeapSize, setMinHeapSize, setSystemProperties, systemProperties, systemProperty
copyTo, environment, environment, executable, getEnvironment, getExecutable, getWorkingDir, setEnvironment, setExecutable, setExecutable, setWorkingDir, setWorkingDir, workingDir
@Incubating @Optional @Input Property<String> getMainModule()
@Incubating @Optional @Input Property<String> getMainClass()
This does not need to be set if using an Executable Jar with a Main-Class
attribute.
Use this property instead of getMain()
and setMain(String)
.
@Nullable @Optional @Internal String getMain()
This does not need to be set if using an Executable Jar with a Main-Class
attribute.
JavaExecSpec setMain(@Nullable String main)
main
- the fully qualified name of the main class to be executed.@Nullable @Optional @Input List<String> getArgs()
JavaExecSpec args(Object... args)
args
- Args for the main class.JavaExecSpec args(Iterable<?> args)
args
- Args for the main class.JavaExecSpec setArgs(@Nullable List<String> args)
args
- Args for the main class.JavaExecSpec setArgs(@Nullable Iterable<?> args)
args
- Args for the main class.List<CommandLineArgumentProvider> getArgumentProviders()
JavaExecSpec classpath(Object... paths)
paths
- classpath elements@Classpath FileCollection getClasspath()
JavaExecSpec setClasspath(FileCollection classpath)
classpath
- the classpath@Incubating ModularitySpec getModularity()