public class CloverGrailsBuildTaskActions extends Object implements PrePostTaskActions
MIN_GRAILS_VERSION_SUPPORTED -
MAX_GRAILS_VERSION_SUPPORTED.| Constructor and Description |
|---|
CloverGrailsBuildTaskActions() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addCloverToBuildConfigFile(CommonTaskContext context,
File buildConfigFile)
Add Clover dependencies the BuildConfig.groovy file.
|
protected boolean |
addCloverToPomFile(CommonTaskContext context,
File pomFile)
Add Clover dependencies the pom.xml file.
|
TaskResult |
executeAfter(InternalTaskType task,
TaskResult taskResult)
Executes a custom action after the task is executed.
|
void |
executeBefore(InternalTaskType task,
CommonTaskContext context)
Executes a custom action before the task is executed.
|
protected File |
getBuildConfigFile(CommonTaskContext context)
Returns location of BuildConfig file in the workspace.
|
protected File |
getPomFile(CommonTaskContext context)
Returns location of pom.xml file in the workspace.
|
protected boolean |
isRequiredGrailsSupported(CommonTaskContext context)
Returns if the project to be build requires Grails version which is supported by this action
(
MIN_GRAILS_VERSION_SUPPORTED and MAX_GRAILS_VERSION_SUPPORTED). |
public void executeBefore(@NotNull
InternalTaskType task,
@NotNull
CommonTaskContext context)
throws Exception
PrePostTaskActionsexecuteBefore in interface PrePostTaskActionstask - a current task, it can be actually a subclass of TaskType (build plans), DeploymentTaskType
(deployment plans) or CommonTaskType (build or deployment plans)context - a current task context, can be actually a TaskContext (build plans) or
DeploymentTaskContext (deployment plans),
TODO can it be a CommonTaskContext? flow in TaskExecutorImpl suggests that it may happen - but under which conditions actually?Exception - in case when a pre-task action failspublic TaskResult executeAfter(@NotNull InternalTaskType task, @Nullable TaskResult taskResult)
PrePostTaskActionsexecuteAfter in interface PrePostTaskActionstask - a current task which was executedtaskResult - a result of a task execution; may be null in case task terminated abnormallyprotected boolean isRequiredGrailsSupported(@NotNull
CommonTaskContext context)
MIN_GRAILS_VERSION_SUPPORTED and MAX_GRAILS_VERSION_SUPPORTED). It checks the
application.config file in the working directory.true is supported, false otherwise@Nullable protected File getBuildConfigFile(@NotNull CommonTaskContext context)
context - task contextnull if not found@Nullable protected File getPomFile(@NotNull CommonTaskContext context)
context - task contextnull if not foundprotected boolean addCloverToBuildConfigFile(@NotNull
CommonTaskContext context,
@NotNull
File buildConfigFile)
buildConfigFile - file to be modifiedprotected boolean addCloverToPomFile(@NotNull
CommonTaskContext context,
@NotNull
File pomFile)
pomFile - file to be modifiedCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.