hudson.maven
Class MavenBuild

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.Run<P,R>
              extended by hudson.model.AbstractBuild<P,B>
                  extended by hudson.maven.AbstractMavenBuild<MavenModule,MavenBuild>
                      extended by hudson.maven.MavenBuild
All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ModelObject, PersistenceRoot, Queue.Executable, Saveable, SearchableModelObject, SearchItem, AccessControlled, Comparable<MavenBuild>, Runnable

public class MavenBuild
extends AbstractMavenBuild<MavenModule,MavenBuild>

Run for MavenModule.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 class MavenBuild.ProxyImpl2
           
 
Nested classes/interfaces inherited from class hudson.model.AbstractBuild
AbstractBuild.AbstractRunner, AbstractBuild.DependencyChange
 
Nested classes/interfaces inherited from class hudson.model.Run
Run.Artifact, Run.ArtifactList, Run.KeepLogBuildBadge, Run.RedirectUp, Run.Runner, Run.RunnerAbortedException, Run.Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static boolean debug
          Set true to produce debug output.
protected static ProcessCache mavenProcessCache
           
 
Fields inherited from class hudson.model.AbstractBuild
buildEnvironments
 
Fields inherited from class hudson.model.Run
ARTIFACTS, charset, DELETE, description, duration, FEED_ADAPTER, FEED_ADAPTER_LATEST, ID_FORMATTER, LIST_CUTOFF, nextBuild, number, ORDER_BY_DATE, PERMISSIONS, previousBuild, project, result, state, timestamp, TREE_CUTOFF, UPDATE, XSTREAM
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
MavenBuild(MavenModule job)
           
MavenBuild(MavenModule job, Calendar timestamp)
           
MavenBuild(MavenModule project, File buildDir)
           
 
Method Summary
static ExecutedMojo.Cache createExecutedMojoCache()
           
 Node getBuiltOn()
           
 ChangeLogSet<? extends ChangeLogSet.Entry> getChangeSet()
           
 String getDisplayName()
           
 EnvVars getEnvironment(TaskListener log)
          Exposes MAVEN_OPTS to forked processes.
 List<ExecutedMojo> getExecutedMojos()
           
 MavenModuleSetBuild getModuleSetBuild()
          Gets the "governing" MavenModuleSet that has set the workspace for this build.
 MavenModule getParent()
           
 MavenModuleSetBuild getParentBuild()
          Gets the MavenModuleSetBuild that has the same build number.
 List<MavenProjectActionBuilder> getProjectActionBuilders()
           
 String getUpUrl()
           
 String getWhyKeepLog()
          If the parent MavenModuleSetBuild is kept, keep this record, too.
 boolean hasChangeSetComputed()
          We always get the changeset from MavenModuleSetBuild.
 void registerAsProjectAction(MavenProjectActionBuilder builder)
           
 void registerAsProjectAction(MavenReporter reporter)
           
 void run()
           
 void setBuiltOnStr(String builtOn)
           
protected  void setWorkspace(FilePath path)
          Backdoor for MavenModuleSetBuild to assign workspaces for modules.
 
Methods inherited from class hudson.model.AbstractBuild
delete, doStop, due, getBuildVariableResolver, getBuildVariables, getBuiltOnStr, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getHudsonVersion, getModuleRoot, getModuleRoots, getProject, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getWorkspace, hasParticipant
 
Methods inherited from class hudson.model.Run
addAction, checkPermission, compareTo, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDescriptorByName, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getIDFormatter, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNextBuild, getNumber, getPreviousBuild, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getResult, getRootDir, getSearchUrl, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, hasPermission, isBuilding, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, run, save, setDescription, setDisplayName, setResult, submit, toString, writeLogTo
 
Methods inherited from class hudson.model.Actionable
getAction, getAction, getActions, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hudson.model.Queue.Executable
getEstimatedDuration, toString
 

Field Detail

mavenProcessCache

protected static final ProcessCache mavenProcessCache

debug

public static boolean debug
Set true to produce debug output.

Constructor Detail

MavenBuild

public MavenBuild(MavenModule job)
           throws IOException
Throws:
IOException

MavenBuild

public MavenBuild(MavenModule job,
                  Calendar timestamp)

MavenBuild

public MavenBuild(MavenModule project,
                  File buildDir)
           throws IOException
Throws:
IOException
Method Detail

getUpUrl

public String getUpUrl()
Overrides:
getUpUrl in class AbstractBuild<MavenModule,MavenBuild>

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface ModelObject
Overrides:
getDisplayName in class Run<MavenModule,MavenBuild>

getParentBuild

public MavenModuleSetBuild getParentBuild()
Gets the MavenModuleSetBuild that has the same build number.

Returns:
null if no such build exists, which happens when the module build is manually triggered.
See Also:
getModuleSetBuild()

getModuleSetBuild

public MavenModuleSetBuild getModuleSetBuild()
Gets the "governing" MavenModuleSet that has set the workspace for this build.

Returns:
null if no such build exists, which happens if the build is manually removed.
See Also:
getParentBuild()

getChangeSet

public ChangeLogSet<? extends ChangeLogSet.Entry> getChangeSet()
Overrides:
getChangeSet in class AbstractBuild<MavenModule,MavenBuild>

hasChangeSetComputed

public boolean hasChangeSetComputed()
We always get the changeset from MavenModuleSetBuild.

Overrides:
hasChangeSetComputed in class AbstractBuild<MavenModule,MavenBuild>

getEnvironment

public EnvVars getEnvironment(TaskListener log)
                       throws IOException,
                              InterruptedException
Exposes MAVEN_OPTS to forked processes.

See MavenModuleSetBuild.getEnvironment(TaskListener) for discussion.

Overrides:
getEnvironment in class AbstractBuild<MavenModule,MavenBuild>
Throws:
IOException
InterruptedException

registerAsProjectAction

public void registerAsProjectAction(MavenReporter reporter)

registerAsProjectAction

public void registerAsProjectAction(MavenProjectActionBuilder builder)

getProjectActionBuilders

public List<MavenProjectActionBuilder> getProjectActionBuilders()

getExecutedMojos

public List<ExecutedMojo> getExecutedMojos()

run

public void run()
Specified by:
run in interface Queue.Executable
Specified by:
run in interface Runnable
Specified by:
run in class AbstractBuild<MavenModule,MavenBuild>

getWhyKeepLog

public String getWhyKeepLog()
If the parent MavenModuleSetBuild is kept, keep this record, too.

Overrides:
getWhyKeepLog in class AbstractBuild<MavenModule,MavenBuild>

createExecutedMojoCache

public static ExecutedMojo.Cache createExecutedMojoCache()

setWorkspace

protected void setWorkspace(FilePath path)
Backdoor for MavenModuleSetBuild to assign workspaces for modules.

Overrides:
setWorkspace in class AbstractBuild<MavenModule,MavenBuild>

getBuiltOn

public Node getBuiltOn()
Overrides:
getBuiltOn in class AbstractBuild<MavenModule,MavenBuild>
Since:
1.394
See Also:
AbstractBuild.getBuiltOn()

setBuiltOnStr

public void setBuiltOnStr(String builtOn)
Parameters:
builtOn -
Since:
1.394

getParent

public MavenModule getParent()
Specified by:
getParent in interface Queue.Executable
Overrides:
getParent in class AbstractBuild<MavenModule,MavenBuild>


Copyright © 2004-2011. All Rights Reserved.