org.hudsonci.maven.plugin.builder
Class MavenBuilder

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by org.hudsonci.maven.plugin.builder.MavenBuilder
All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep

public class MavenBuilder
extends Builder

Hudson Maven Builder. WARNING: for Builds (which includes multi-configuration builds) the same Builder instance is used for all executions. Hence do not store state in the builder if it's specific to an execution. Instead use the BuildStateRecord or BuildStateDTO created in perform(AbstractBuild, Launcher, BuildListener) by passing it to the necessary objects. In the future we may use a ThreadLocal or some other context during the life of a build execution.

Since:
2.1.0
Author:
Jason Dillon

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
MavenBuilder(BuildConfigurationDTO config)
           
 
Method Summary
 BuildConfigurationDTO getConfig()
           
 MavenBuilderDescriptor getDescriptor()
           
 DocumentDTO getDocument(String id)
           
 MavenInstallation getMavenInstallation()
           
 NodeService getNodes()
           
 boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
           
 void setNodes(NodeService nodes)
           
 void setSecurity(SecurityService security)
           
 
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Constructor Detail

MavenBuilder

public MavenBuilder(BuildConfigurationDTO config)
Method Detail

setSecurity

@Inject
public void setSecurity(SecurityService security)

setNodes

@Inject
public void setNodes(NodeService nodes)

getNodes

public NodeService getNodes()

getDescriptor

public MavenBuilderDescriptor getDescriptor()
Specified by:
getDescriptor in interface Describable<Builder>
Overrides:
getDescriptor in class Builder

getConfig

@JellyAccessible
public BuildConfigurationDTO getConfig()

getMavenInstallation

public MavenInstallation getMavenInstallation()

getDocument

public DocumentDTO getDocument(String id)

perform

public boolean perform(AbstractBuild<?,?> build,
                       Launcher launcher,
                       BuildListener listener)
                throws InterruptedException,
                       IOException
Specified by:
perform in interface BuildStep
Overrides:
perform in class BuildStepCompatibilityLayer
Throws:
InterruptedException
IOException


Copyright © 2004-2011 Hudson. All Rights Reserved.