com.atlassian.bamboo.builder
Class Maven2Builder

java.lang.Object
  extended by com.atlassian.bamboo.command.Command
      extended by com.atlassian.bamboo.builder.AbstractBuilder
          extended by com.atlassian.bamboo.builder.AbstractJdkBuilder
              extended by com.atlassian.bamboo.builder.AbstractMavenBuilder
                  extended by com.atlassian.bamboo.builder.Maven2Builder
All Implemented Interfaces:
Builder, EnvironmentVariablesAwareBuilder, MutableEnvironmentVariablesAwareBuilder, PostConfigurableBuilder, InitablePluginModule, BambooPluginModule, BuilderV2, ConfigurablePlugin, java.io.Serializable

public class Maven2Builder
extends AbstractMavenBuilder
implements PostConfigurableBuilder

This class provides a Maven 2.x version of Builder.

See Also:
Serialized Form

Field Summary
static java.lang.String BUILDER_PATH_LABEL
           
static java.lang.String COMPLETE_KEY
           
static java.lang.String MAVEN2_DEPENDENCY_TYPE
           
static java.lang.String NAME
           
static java.lang.String PARAM_DEPENDENCY_FEATURE
           
static java.lang.String PARAM_DEPENDENCY_FEATURE_PREV
           
static java.lang.String PATHHELP
           
 
Fields inherited from class com.atlassian.bamboo.builder.AbstractMavenBuilder
CUSTOM_TEST_DIRECTORY_SELECTED, goal, LOCAL_REPOSITORY_PROPERTY_NAME, PARAM_GOAL, PARAM_TEST_DIRECTORY_OPTION, STANDARD_TEST_DIRECTORY_SELECTED, testDirectoryOption
 
Fields inherited from class com.atlassian.bamboo.builder.AbstractBuilder
BUILD_FAILED_MARKER, BUILD_SUCCESSFUL_MARKER, buildDirectoryManager, DEFAULT_TEST_REPORTS_XML, errorUpdateHandler, FIND_FAILURE_MESSAGE_IN_LAST, FIND_SUCCESS_MESSAGE_IN_LAST, PARAM_BUILD_LABEL, PARAM_BUILDJDK, PARAM_ENV_VAR, PARAM_HASTESTS, PARAM_HOME, PARAM_PROJECT_FILE, PARAM_TEST_RESULTS_DIRECTORY, PARAM_WORKING_SUB_DIR, SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE, templateRenderer
 
Fields inherited from class com.atlassian.bamboo.command.Command
buildLoggerManager, substitutionBean
 
Fields inherited from interface com.atlassian.bamboo.builder.Builder
CAPABILITY_BUILDER_PREFIX, CAPABILITY_BUILDER_TYPE
 
Constructor Summary
Maven2Builder()
           
 
Method Summary
 java.util.Map<java.lang.String,LabelPathMap> addDefaultLabelPathMaps(java.util.Map<java.lang.String,LabelPathMap> labelPathMaps)
           
 void addDefaultValues(BuildConfiguration configuration)
          Extension point for adding default values to the form for ConfigurablePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
protected  java.lang.String[] getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
           
protected  java.lang.String getDefaultTestReportsDirectory()
           
protected  java.lang.String getExecutableFileName()
          Gets the executable file name
 java.util.Map<java.lang.String,java.lang.String> getFullParams()
          Gets the full params that's used to persist.
 java.lang.String getName()
          Returns a human readable version of the current Builder type
 java.lang.String getPathHelp()
          Help text for the builder type
protected  java.util.Map<java.lang.String,java.lang.Object> getTemplateContext()
           
 java.lang.String getUrl()
           
 boolean isDependencyFeatureOn()
           
 void performPostConfiguration(java.lang.String selectedBuilder, BuildConfiguration builderConfiguration, Plan plan)
          Preform any post actions that might need to occur after you save the builder configuration.
 void populateBuildErrors(CurrentBuildResult buildResult, java.util.List<java.lang.String> errorOutput, java.lang.String planKey, int buildNumber)
          An extension point for implementors to modify the Error Summary
 void setDependencyFeatureOn(boolean dependencyFeatureOn)
           
 void setMaven2LogHelper(Maven2LogHelper maven2LogHelper)
           
 void setParams(FilteredMap filteredBuilderParams)
          Updates the current builder object with
 void setPlanDependencyManager(PlanDependencyManager planDependencyManager)
           
 void setPlanParticleManager(PlanParticleManager planParticleManager)
           
 
Methods inherited from class com.atlassian.bamboo.builder.AbstractMavenBuilder
getCommandArguments, getCommandExecutable, getGoal, getMavenExecutablePath, getTestDirectory, getTestResultsDirectory, hasPassed, isPathValid, setGoal, setTestDirectory, validate, validate
 
Methods inherited from class com.atlassian.bamboo.builder.AbstractJdkBuilder
customizeBuildRequirements, removeBuildRequirements
 
Methods inherited from class com.atlassian.bamboo.builder.AbstractBuilder
collateTestResults, customiseLabelTypeMap, executeBuild, getBuildDir, getBuildDirectoryManager, getBuildJdk, getCompleteKey, getEditHtml, getEnvironmentVariables, getFilteredParams, getKey, getKeyPrefix, getLabel, getPath, getProjectFile, getTestChecked, getViewHtml, getWorkingDirectory, getWorkingSubDirectory, hasTests, init, isJdkValid, isLabelPathMapConfigurable, outputEndsWith, prepareConfigObject, runBuild, setAdministrationConfiguration, setBuildDir, setBuildDirectoryManager, setBuildJdk, setBuildLogFileAccessorFactory, setEnvironmentVariables, setErrorUpdateHandler, setHasTests, setJdkManager, setKey, setLabel, setProjectFile, setTemplateRenderer, setTestChecked, setTestResultsDirectory, setWorkingSubDirectory, toString, validate
 
Methods inherited from class com.atlassian.bamboo.command.Command
decorateCommandLine, executeCommand, getBuildLoggerManager, getCommandLine, getEnvironmentSetting, getSubstitutedCommandLine, getVariableSubstitutionBean, isWindowsPlatform, setBuildLoggerManager, setPluginAccessor, setVariableSubstitutionBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.builder.Builder
customiseLabelTypeMap, getBuildJdk, getCompleteKey, getKey, getLabel, getPath, hasTests, isLabelPathMapConfigurable, isPathValid, setBuildJdk, setLabel, validate
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuilderV2
executeBuild, hasPassed
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, getEditHtml, getViewHtml, prepareConfigObject, removeBuildRequirements, validate
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 

Field Detail

COMPLETE_KEY

public static final java.lang.String COMPLETE_KEY
See Also:
Constant Field Values

BUILDER_PATH_LABEL

public static final java.lang.String BUILDER_PATH_LABEL
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

PATHHELP

public static final java.lang.String PATHHELP
See Also:
Constant Field Values

PARAM_DEPENDENCY_FEATURE

public static final java.lang.String PARAM_DEPENDENCY_FEATURE
See Also:
Constant Field Values

PARAM_DEPENDENCY_FEATURE_PREV

public static final java.lang.String PARAM_DEPENDENCY_FEATURE_PREV
See Also:
Constant Field Values

MAVEN2_DEPENDENCY_TYPE

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

Maven2Builder

public Maven2Builder()
Method Detail

getName

@NotNull
public java.lang.String getName()
Description copied from interface: Builder
Returns a human readable version of the current Builder type

Specified by:
getName in interface Builder
Returns:

getUrl

public java.lang.String getUrl()

getExecutableFileName

protected java.lang.String getExecutableFileName()
Description copied from class: AbstractMavenBuilder
Gets the executable file name

Specified by:
getExecutableFileName in class AbstractMavenBuilder
Returns:
The executable file name

getCustomEnvironmentVars

protected java.lang.String[] getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
Overrides:
getCustomEnvironmentVars in class Command

getTemplateContext

protected java.util.Map<java.lang.String,java.lang.Object> getTemplateContext()
Overrides:
getTemplateContext in class AbstractMavenBuilder

getDefaultTestReportsDirectory

protected java.lang.String getDefaultTestReportsDirectory()
Specified by:
getDefaultTestReportsDirectory in class AbstractMavenBuilder

addDefaultLabelPathMaps

public java.util.Map<java.lang.String,LabelPathMap> addDefaultLabelPathMaps(java.util.Map<java.lang.String,LabelPathMap> labelPathMaps)
Specified by:
addDefaultLabelPathMaps in interface Builder
Returns:

populateBuildErrors

public void populateBuildErrors(CurrentBuildResult buildResult,
                                java.util.List<java.lang.String> errorOutput,
                                java.lang.String planKey,
                                int buildNumber)
Description copied from class: AbstractBuilder
An extension point for implementors to modify the Error Summary

Specified by:
populateBuildErrors in interface BuilderV2
Overrides:
populateBuildErrors in class AbstractBuilder
Parameters:
buildResult - - CurrentBuildResult representing the results of the current build
errorOutput - - ErrorLogEntry objects representing the current std error output

getPathHelp

@NotNull
public java.lang.String getPathHelp()
Description copied from interface: Builder
Help text for the builder type

Specified by:
getPathHelp in interface Builder
Overrides:
getPathHelp in class AbstractBuilder
Returns:

setMaven2LogHelper

public void setMaven2LogHelper(Maven2LogHelper maven2LogHelper)

setDependencyFeatureOn

public void setDependencyFeatureOn(boolean dependencyFeatureOn)

isDependencyFeatureOn

public boolean isDependencyFeatureOn()

addDefaultValues

public void addDefaultValues(@NotNull
                             BuildConfiguration configuration)
Description copied from interface: ConfigurablePlugin
Extension point for adding default values to the form for ConfigurablePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)

Specified by:
addDefaultValues in interface ConfigurablePlugin
Overrides:
addDefaultValues in class AbstractMavenBuilder
Parameters:
configuration - - @NotNull

setParams

public void setParams(@NotNull
                      FilteredMap filteredBuilderParams)
Description copied from interface: Builder
Updates the current builder object with

Specified by:
setParams in interface Builder
Overrides:
setParams in class AbstractMavenBuilder
Parameters:
filteredBuilderParams - - Filtered Map with the prefix builder key stripped out

getFullParams

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getFullParams()
Description copied from interface: Builder
Gets the full params that's used to persist.

Specified by:
getFullParams in interface Builder
Overrides:
getFullParams in class AbstractMavenBuilder
Returns:
Map key by the full param key (e.g. builder.ant.label). Never null

performPostConfiguration

public void performPostConfiguration(java.lang.String selectedBuilder,
                                     BuildConfiguration builderConfiguration,
                                     Plan plan)
Description copied from interface: PostConfigurableBuilder
Preform any post actions that might need to occur after you save the builder configuration. This will get run on all builders regardless of which one is actually selected. Example usage is to clean up unused data if you are not the selected builder or add extra info if you are the selected builder.

Specified by:
performPostConfiguration in interface PostConfigurableBuilder
Parameters:
selectedBuilder - - the key of the builder currently selected (may or may not be you)
builderConfiguration - - for the current build
plan - - that is being configured

setPlanDependencyManager

public void setPlanDependencyManager(PlanDependencyManager planDependencyManager)

setPlanParticleManager

public void setPlanParticleManager(PlanParticleManager planParticleManager)


Copyright © 2010 Atlassian. All Rights Reserved.