Package hudson.plugins.nant
Class NantBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- hudson.plugins.nant.NantBuilder
-
- All Implemented Interfaces:
ExtensionPoint,Describable<Builder>,BuildStep
public class NantBuilder extends Builder
SampleBuilder.When the user configures the project and enables this builder,
Descriptor.newInstance(StaplerRequest)is invoked and a newNantBuilderis created. The created instance is persisted to the project configuration XML by using XStream, so this allows you to use instance fields (likenantName) to remember the configuration.When a build is performed, the
#perform(Build, Launcher, BuildListener)method will be invoked.- Author:
- kyle.sweeney@valtech.com, Justin Holzer (jsholzer@gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNantBuilder.DescriptorImplDescriptor forNantBuilder.static classNantBuilder.NantInstallation-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static NantBuilder.DescriptorImplDESCRIPTORDescriptor should be singleton.-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description NantBuilder(String nantBuildFile, String nantName, String targets, String properties)When this builder is created in the project configuration step, the builder object will be created from the strings below.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptor<Builder>getDescriptor()NantBuilder.NantInstallationgetNant()Gets the NAnt to invoke, or null to invoke the default one.StringgetNantBuildFile()StringgetNantName()StringgetProperties()StringgetTargets()We'll use these from theconfig.jelly.booleanperform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)-
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Field Detail
-
DESCRIPTOR
@Extension public static final NantBuilder.DescriptorImpl DESCRIPTOR
Descriptor should be singleton.
-
-
Constructor Detail
-
NantBuilder
@DataBoundConstructor public NantBuilder(String nantBuildFile, String nantName, String targets, String properties)
When this builder is created in the project configuration step, the builder object will be created from the strings below.- Parameters:
nantBuildFile- The name/location of the nant build fildtargets- Whitespace separated list of nant targets to runproperties- property definitions (in Java properties format)
-
-
Method Detail
-
getNant
public NantBuilder.NantInstallation getNant()
Gets the NAnt to invoke, or null to invoke the default one.
-
getTargets
public String getTargets()
We'll use these from theconfig.jelly.
-
getNantBuildFile
public String getNantBuildFile()
-
getNantName
public String getNantName()
-
getProperties
public String getProperties()
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
- Specified by:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer- Throws:
InterruptedExceptionIOException
-
getDescriptor
public Descriptor<Builder> getDescriptor()
- Specified by:
getDescriptorin interfaceDescribable<Builder>- Overrides:
getDescriptorin classBuilder
-
-