public static ExecutionProperty< | createEnvironmentSelectionTestExecutionProperty( Creates an execution property that tests and environment selector. |
public static ExecutionProperty< | createLocalFileContentDescriptorExecutionProperty( Creates an execution property that queries the content descriptor of a given local
file. |
public static String | Gets the file name part of the argument file location. |
The execution property will use
ExecutionContext.testEnvironmentSelection(
The property can be used with build clusters to determine if a given operation can be executed in the current build configuration.
null
.
The execution property will return the content descriptor of the denoted file by using
ExecutionContext.getContentDescriptor(null
.
The argument tag serves as an unique identifier for the execution property. It can be used to uniquely associate a given execution property with a given task. This can be important as the result of execution properties are cached during build execution. If another task modifies the denoted file, the changes in the file contents may be unnoticed.
Specifying an arbitrary tag object for the execution property helps avoiding the issue by directly associating it
with a caller task. In general, the task identifier of your task is a good
tag to be passed to this function. Others, such an unique UUID is also a good candidate.
The tag should be serializable, and implement Object.equals(
Note that if you're using this execution property to report local output file dependencies, you may need to set additional unique values as part of the tag. This is because the build system will check the value of the execution property when it detects the deltas for the task. If you report the property with the same tag, then the old (cached) value may be reported, therefore causing unexpected results. An example that works around this for output files:
TaskContext taskcontext; taskcontext.getTaskUtilities().getReportExecutionDependency( SakerStandardUtils.createLocalFileContentDescriptorExecutionProperty(outputlocalfilepath, ImmutableUtils.asUnmodifiableArrayList(taskcontext.getTaskId(), UUID.randomUUID())));
null
.null
.The method will return the last file name component for the path of the argument.
null
if the argument is null
, or has no file name.