com.atlassian.bamboo.ant.task
Class SingleAntBuildTask

java.lang.Object
  extended by com.atlassian.bamboo.ant.task.AbstractSingleAntBuildTask
      extended by com.atlassian.bamboo.ant.task.SingleAntBuildTask
All Implemented Interfaces:
InternalTaskType<TaskContext>, TaskType

public class SingleAntBuildTask
extends AbstractSingleAntBuildTask

Maps a single Ant task to a Bamboo build task.

Since:
3.4

Field Summary
static java.lang.String PARAM_DESCRIPTOR_CLASS
           
 
Constructor Summary
SingleAntBuildTask(com.atlassian.plugin.PluginAccessor pluginAccessor, TaskPropertyConfigurators configurators)
           
 
Method Summary
protected  AntTaskDescriptor createDescriptor(TaskContext taskContext)
          

Create descriptor of the Ant task executed by this Bamboo build task.

protected  org.apache.tools.ant.Task createTask(TaskContext taskContext)
          Create Ant task ready for execution.
protected  void initTask(java.lang.Object task, TaskContext taskContext)
          

Custom initialization of the Ant task before it gets executed.

 
Methods inherited from class com.atlassian.bamboo.ant.task.AbstractSingleAntBuildTask
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_DESCRIPTOR_CLASS

public static final java.lang.String PARAM_DESCRIPTOR_CLASS
See Also:
Constant Field Values
Constructor Detail

SingleAntBuildTask

public SingleAntBuildTask(com.atlassian.plugin.PluginAccessor pluginAccessor,
                          TaskPropertyConfigurators configurators)
Method Detail

createTask

protected final org.apache.tools.ant.Task createTask(TaskContext taskContext)
                                              throws TaskException
Description copied from class: AbstractSingleAntBuildTask
Create Ant task ready for execution.

Specified by:
createTask in class AbstractSingleAntBuildTask
Parameters:
taskContext - task context
Returns:
Ant task for execution
Throws:
TaskException - if failed to create Ant task to execute

createDescriptor

protected AntTaskDescriptor createDescriptor(TaskContext taskContext)
                                      throws TaskException

Create descriptor of the Ant task executed by this Bamboo build task.

By default this method will find the task module descriptor and resolve descriptor from a custom parameter PARAM_DESCRIPTOR_CLASS.

Parameters:
taskContext - task context.
Returns:
descriptor of the task to execute.
Throws:
TaskException - if failed to create Ant task descriptor

initTask

protected void initTask(java.lang.Object task,
                        TaskContext taskContext)

Custom initialization of the Ant task before it gets executed.

This will usually be extension of Task, but does not have to as Ant allows arbitrary classes to act as tasks.

Parameters:
task - the Ant task about to execute
taskContext - the task contexts


Copyright © 2012 Atlassian. All Rights Reserved.