public class AbstractExecSpec<T extends AbstractExecSpec<T>>
Base class for creating execution specifications.
T - Class extending AbstractExecSpec.| Modifiers | Name | Description |
|---|---|---|
protected AppRunnerSpec |
appRunnerSpec |
| Constructor and description |
|---|
protected AbstractExecSpec
(ProjectOperations po) |
protected AbstractExecSpec
(ConfigCacheSafeOperations po)Constructs this from an instance of ConfigCacheSafeOperations. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
addCommandLineProcessor(String name, Integer order, CmdlineArgumentSpec processor)Adds a command-line processor that will process command-line arguments in a specific order. |
|
public void |
copyTo(ExecSpec spec)Copies this specification to a standard ExecSpec. |
|
public void |
entrypoint(Action<ExecutableEntryPoint> configurator)Configures the native entrypoint. |
|
public void |
entrypoint(groovy.lang.Closure<?> configurator)Configures the native entrypoint. |
|
protected java.util.Collection<CmdLineArgumentSpecEntry> |
getCommandLineProcessors() |
|
public ExecutableEntryPoint |
getEntrypoint()Access to the entrypoint |
|
public ProcessExecutionSpec |
getProcess()Access to the process specification. |
|
public CmdlineArgumentSpec |
getRunnerSpec()Access to the runner specification. |
|
protected ConfigCacheSafeOperations |
getTaskOperations() |
|
public void |
process(Action<ProcessExecutionSpec> configurator)Configures the stream redirections and exit checks. |
|
public void |
process(groovy.lang.Closure<?> configurator)Configures the stream redirections and exit checks. |
|
public void |
runnerSpec(Action<CmdlineArgumentSpec> configurator)Configures the arguments. |
|
public void |
runnerSpec(groovy.lang.Closure<?> configurator)Configures the arguments. |
|
public ExecOutput |
submitAsExec()Runs a job using javaexec. |
|
public ExecOutput |
submitAsExec(Action<ExecSpec> additionalConfiguration)Runs a job using javaexec. |
Constructs this from an instance of ConfigCacheSafeOperations.
A task having GrolifantDefaultTask in its parent lineage, can just pass a this reference.
po - Instance of ConfigCacheSafeOperations.Adds a command-line processor that will process command-line arguments in a specific order.
For instance in a script, one want to process the exe args before the script args.
In a system that has commands and subcommands, one wants to process this in the order of exe args, command args, and then subcommand args.
This method allows the implementor to control the order of processing for all the groupings.
name - Name of command-line processor.order - Order in queue to process.processor - The specific grouping.Copies this specification to a standard ExecSpec.
spec - Target execution specification.Configures the native entrypoint.
configurator - An action to configure the external executable's entrypoint.Configures the native entrypoint.
configurator - A closure to configure the external executable's entrypoint.Access to the entrypoint
Access to the process specification.
Access to the runner specification.
Configures the stream redirections and exit checks.
configurator - An action to configure the execution.Configures the stream redirections and exit checks.
configurator - A closure to configure the execution.Configures the arguments.
configurator - An action to configure the arguments.Configures the arguments.
configurator - A closure to configure the arguments. Runs a job using javaexec.
Runs a job using javaexec.
additionalConfiguration - Allows the caller to perform additional configuration on the final
ExecSpec. This is called only after all other configurations have been completed.