com.atlassian.bamboo.plugins.grails
Class GrailsBuildTask

java.lang.Object
  extended by com.atlassian.bamboo.plugins.grails.GrailsBuildTask
All Implemented Interfaces:
InternalTaskType, TaskType

public class GrailsBuildTask
extends Object
implements TaskType


Field Summary
static String GRAILS_RUN_CLEAN_GOAL
          Whether we should run the "grails clean" before running other goals
 
Constructor Summary
GrailsBuildTask(ProcessService processService, TestCollationService testCollationService, EnvironmentVariableAccessor environmentVariableAccessor, CapabilityContext capabilityContext)
           
 
Method Summary
 TaskResult execute(TaskContext taskContext)
          Execute the task
static String getInstalledGrailsVersion(String commandExecutable)
          Look up in grails command home directory and read the grails version number form the 'build.properties' file
static String getRequiredGrailsVersion(CommonTaskContext taskContext)
          Look up for 'application.properties' file and return Grails version set in it.
static boolean isGrailsVersionTheSameAsProject(String commandExecutable, CommonTaskContext taskContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAILS_RUN_CLEAN_GOAL

public static final String GRAILS_RUN_CLEAN_GOAL
Whether we should run the "grails clean" before running other goals

See Also:
Constant Field Values
Constructor Detail

GrailsBuildTask

public GrailsBuildTask(ProcessService processService,
                       TestCollationService testCollationService,
                       EnvironmentVariableAccessor environmentVariableAccessor,
                       CapabilityContext capabilityContext)
Method Detail

execute

@NotNull
public TaskResult execute(@NotNull
                                  TaskContext taskContext)
                   throws TaskException
Description copied from interface: TaskType
Execute the task

Specified by:
execute in interface TaskType
Returns:
a TaskResult representing the status of the task execution
Throws:
TaskException

getRequiredGrailsVersion

@Nullable
public static String getRequiredGrailsVersion(@NotNull
                                                       CommonTaskContext taskContext)
Look up for 'application.properties' file and return Grails version set in it.

Parameters:
taskContext - task context
Returns:
String grails version or null if not found

getInstalledGrailsVersion

@Nullable
public static String getInstalledGrailsVersion(@NotNull
                                                        String commandExecutable)
Look up in grails command home directory and read the grails version number form the 'build.properties' file

Returns:
String grails version or null if not found

isGrailsVersionTheSameAsProject

public static boolean isGrailsVersionTheSameAsProject(@NotNull
                                                      String commandExecutable,
                                                      @NotNull
                                                      CommonTaskContext taskContext)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.