public class SpawnJavaProcess
Generic task for starting a java process in the background.
public static com.intershop.gradle.icm.tasks.SpawnJavaProcess.Companion Companion
public void provideMain(@NotNull
org.gradle.api.provider.Provider<java.lang.String> mainClass)
Set provider for main class property.
mainClass - set provider for main class.@Input @NotNull public java.lang.String getMain()
public void setMain(@NotNull
java.lang.String p)
public void provideReadyString(@NotNull
org.gradle.api.provider.Provider<java.lang.String> readyString)
Set provider for a ready string property.
readyString - set provider for ready string.@Input @NotNull public java.lang.String getReadyString()
public void setReadyString(@NotNull
java.lang.String p)
public void providerMinHeapSize(@NotNull
org.gradle.api.provider.Provider<java.lang.String> minHeapSize)
Set provider for minHeapSize string property.
minHeapSize - minimum memory size.@Input @NotNull public java.lang.String getMinHeapSize()
public void setMinHeapSize(@NotNull
java.lang.String p)
public void providerMaxHeapSize(@NotNull
org.gradle.api.provider.Provider<java.lang.String> maxHeapSize)
Set provider for maxHeapSize string property.
maxHeapSize - maximum memory size.@Optional @Input @NotNull public java.lang.String getMaxHeapSize()
public void setMaxHeapSize(@NotNull
java.lang.String p)
public void providerTimeout(@NotNull
org.gradle.api.provider.Provider<java.lang.Integer> timeout)
Set provider for timeout property.
timeout - maximum time in seconds before the task will be finished with an exception.@Input public int getTimeout()
public void setTimeout(int p)
@InputDirectory @NotNull public java.io.File getWorkingDir()
The workingDir is used for the execution of the java process.
public void setWorkingDir(@NotNull
java.io.File value)
The workingDir is used for the execution of the java process.
@OutputFile @NotNull public java.io.File getPidFile()
The file will contain the pid of the process. As long this file exists, it should be not possible to spawn a new process.
public void setPidFile(@NotNull
java.io.File value)
The file will contain the pid of the process. As long this file exists, it should be not possible to spawn a new process.
@Classpath @NotNull public org.gradle.api.file.FileCollection getClasspath()
This file collection contains the main class and all necessary class files for execution.
public void setClasspath(@NotNull
org.gradle.api.file.FileCollection value)
This file collection contains the main class and all necessary class files for execution.
@OutputFile @NotNull public java.io.File getLogOutputFile()
The file will contain the log output of the process.
public void setLogOutputFile(@NotNull
java.io.File value)
The file will contain the log output of the process.
public void providerJvmArgs(@NotNull
org.gradle.api.provider.Provider<java.util.List> jvmArgs)
Set provider for JVM arguments.
jvmArgs - list of JVM arguments.@Input @NotNull public java.util.List<java.lang.String> getJvmArgs()
This list contains parameters for the jvm.
public void setJvmArgs(@NotNull
java.util.List<java.lang.String> p)
This list contains parameters for the jvm.
public void jvmArgs(@NotNull
java.lang.Object... jvmArgs)
Add JVM args to the list of JVM args.
jvmArgs - one ore more JVM arguments.public void jvmArgs(@NotNull
java.lang.Iterable<? extends java.lang.Object> jvmArgs)
Add a list of JVM args to the list of JVM args.
jvmArgs - list of JVM arguments.public void providerArgs(@NotNull
org.gradle.api.provider.Provider<java.util.List> args)
Set provider for arguments passed to the main class.
args - list of arguments.@Input @NotNull public java.util.List<java.lang.String> getArgs()
This list contains parameters passed to the main java class.
public void setArgs(@NotNull
java.util.List<java.lang.String> p)
This list contains parameters passed to the main java class.
public void args(@NotNull
java.lang.Object... args)
Add args to the list of args passed to the main class.
args - one ore more arguments.public void args(@NotNull
java.lang.Iterable<? extends java.lang.Object> args)
Add a list of args to the list of args passed to the main class.
args - list of arguments.public void argsString(@NotNull
java.lang.String args)
Command line arguments passed to the main class. This list will replace the configured parameters.
args - string of parameters.public void providerEnvironment(@NotNull
org.gradle.api.provider.Provider<java.util.Map> environment)
Set provider for environment.
environment - provider for environment map.@Input @NotNull public java.util.Map<java.lang.String,java.lang.Object> getEnvironment()
This map contains environment properties.
public void setEnvironment(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> value)
This map contains environment properties.
public void environment(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> env)
Add a map of environment variables to the map of environment variables.
env - map of environment variables.public void environment(@NotNull
java.lang.String key,
@NotNull
java.lang.Object value)
Add a new key value pair to the environment variables.
key - name of environment variable.value - value of environment variable.public void providerSystemProperties(@NotNull
org.gradle.api.provider.Provider<java.util.Map> systemProperties)
Set provider for system properties.
systemProperties - provider for system properties map.@Input @NotNull public java.util.Map<java.lang.String,java.lang.Object> getSystemProperties()
This map contains system properties.
public void setSystemProperties(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> value)
This map contains system properties.
public void systemProperties(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> props)
Add a map of system properties to the map of system properties.
public void systemProperty(@NotNull
java.lang.String key,
@NotNull
java.lang.Object value)
Add a new key value pair to the map of system properties.
key - name of system property.value - value of system property.@Input public boolean getDebug()
Enable debugging for the process. The process is started suspended and listening on port 5005. This can be configured also over the gradle parameter "debug-java".
@Internal @NotNull public org.gradle.process.JavaDebugOptions getDebugOptions()
This get the available debug configuration for the java process.
public void debugOptions(@NotNull
org.gradle.api.Action<org.gradle.process.JavaDebugOptions> action)
Configures the debug options for this java process.
action - new configuration for debug options.public void spawnProcess()
Task action starts the java process in the background.