public static String | chooseDefaultTargetName( Chooses a default target name based on a collection of target names. |
public static NavigableMap< | collectFilesForTag( Collects the file references from the given file deltas associated with the given tag. |
public static NavigableMap< | collectFilesForTags( Same as collectFilesForTag( |
public static TaskFactory< | createTask( Looks up a task factory for the given name and optional repository identifier. |
public static void | initParametersOfTask( Initializes the parameter fields of the given task object for the given parameter map. |
public static void | initParametersOfTask( Initializes the parameter fields of the given task object for the given parameter map. |
public static void | printTaskExceptionsOmitTransitive( Prints a formatted exception view and omits transitive task execution failures. |
This method can be used to determine a target to build when the user didn't specify an explicit target name when referencing a build script.
The algorithm is as follows:
- If the names is empty,
null
is returned. - If the size of the names is 1, the single element is returned.
- If the names contain
"build"
, then"build"
is returned. - Else
null
is returned.
null
if failed.null
.This method will examine the file change deltas and collect the paths and files from them.
null
, if
FileChangeDelta.getFile() returns null
.null
.null
, if
FileChangeDelta.getFile() returns null
.null
.The method uses the currently loaded repositories and tries to find a task factory by the given name.
An optional repository identifier can be specified to explicitly try to only load from the repository that bears that identifier.
When calling this from a task execution, use TaskLookupExecutionProperty to ensure proper incremental operation.
null
if all loaded repositories should be used.
This method uses the provided task context to resolve the parameter values. Same as calling
initParametersOfTask(
initParametersOfTask(taskcontext, taskobj, parameters, taskcontext);
This method uses SakerInput and DataContext annotations to assign converted values to the annotated fields.
For each annotated field, the method will look up a corresponding parameter value in the provided parameters map.
If a task identifier is found for any of the parameter names for the field, it will be requested from the
specified task result resolver using TaskResultResolver.getTaskResult(
The method specially handles any fields which have the type of Optional. In that case, if there was no
parameter for the given name, it will be null
. Otherwise, an Optional is created for it with
the value converted to the generic argument of the declared Optional. (I.e. if the field is
null
, the parameter is not present, if it is an Optional that doesn't have a value
present, then the value for it was null
.)
Callers can reify the task resolution implementation by passing a custom implementation of TaskResultResolver as argument.
This method is intended for displaying the exceptions caused by build execution failure.
The method will omit printing exceptions which are caused by other task execution failure exceptions. This helps reducing the clutter that is caused by cascaded task failures.
If a task throws a TaskExecutionFailedException during its Task.run(
Exceptions that are caused by execution deadlock (TaskExecutionDeadlockedException) are also omitted accordingly.
If the method sees that all exceptions would be omitted, it will fall back to printing all exceptions.
The method expects the argument exception view to represent a MultiTaskExecutionFailedException directly thrown by the build execution.
null
to don't relativize.null
.