Package hudson.maven
Class MavenBuild
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.model.Run<P,R>
-
- hudson.model.AbstractBuild<P,B>
-
- hudson.maven.AbstractMavenBuild<MavenModule,MavenBuild>
-
- hudson.maven.MavenBuild
-
- All Implemented Interfaces:
ExtensionPoint
,DescriptorByNameOwner
,ModelObject
,PersistenceRoot
,Queue.Executable
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Comparable<MavenBuild>
,Runnable
,LazyBuildMixIn.LazyLoadingRun<MavenModule,MavenBuild>
,ModelObjectWithContextMenu
,RunWithSCM<MavenModule,MavenBuild>
,OnMaster
,org.kohsuke.stapler.StaplerProxy
public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild>
Run
forMavenModule
.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MavenBuild.ProxyImpl2
-
Nested classes/interfaces inherited from class hudson.model.AbstractBuild
AbstractBuild.AbstractBuildExecution, AbstractBuild.AbstractRunner, AbstractBuild.DependencyChange
-
Nested classes/interfaces inherited from class hudson.model.Run
Run.Artifact, Run.ArtifactList, Run.KeepLogBuildBadge, Run.RedirectUp, Run.RunExecution, Run.Runner, Run.RunnerAbortedException, Run.StatusSummarizer, Run.Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Field Summary
Fields Modifier and Type Field Description 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, LIST_CUTOFF, nextBuild, number, ORDER_BY_DATE, PERMISSIONS, previousBuild, project, QUEUE_ID_UNKNOWN, result, SKIP_PERMISSION_CHECK, timestamp, TREE_CUTOFF, UPDATE, XSTREAM, XSTREAM2
-
-
Constructor Summary
Constructors Constructor Description MavenBuild(MavenModule job)
MavenBuild(MavenModule project, File buildDir)
MavenBuild(MavenModule job, Calendar timestamp)
-
Method Summary
-
Methods inherited from class hudson.maven.AbstractMavenBuild
expandTokens
-
Methods inherited from class hudson.model.AbstractBuild
addAction, calculateCulprits, createReference, doStop, doStop, dropLinks, due, getAggregatedTestResultAction, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSets, getCulpritIds, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getEnvironments, getHudsonVersion, getModuleRoot, getModuleRoots, getNextBuild, getParentExecutable, getPersistentActions, getPreviousBuild, getProject, getRunMixIn, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getWorkspace, shouldCalculateCulprits
-
Methods inherited from class hudson.model.Run
_this, canToggleLogKeep, compareTo, delete, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifactManager, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildFingerprints, getBuildsOverThreshold, getBuildStatusIconClassName, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, isBuilding, isInProgress, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, pickArtifactManager, reload, run, save, setDescription, setDisplayName, setQueueId, setResult, submit, toString, updateSymlinks, writeLogTo, writeReplace, writeWholeLogTo
-
Methods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActions
-
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.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
-
Methods inherited from interface hudson.model.Queue.Executable
getEstimatedDuration, toString
-
Methods inherited from interface jenkins.scm.RunWithSCM
hasParticipant
-
-
-
-
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 classAbstractBuild<MavenModule,MavenBuild>
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classRun<MavenModule,MavenBuild>
-
getParentBuild
@CheckForNull public MavenModuleSetBuild getParentBuild()
Gets theMavenModuleSetBuild
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()
-
getRootBuild
public AbstractBuild<?,?> getRootBuild()
The same asgetParentBuild()
except that returns itself when no parent.- Overrides:
getRootBuild
in classAbstractBuild<MavenModule,MavenBuild>
-
getModuleSetBuild
@CheckForNull 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 classAbstractBuild<MavenModule,MavenBuild>
-
hasChangeSetComputed
public boolean hasChangeSetComputed()
We always get the changeset fromMavenModuleSetBuild
.- Overrides:
hasChangeSetComputed
in classAbstractBuild<MavenModule,MavenBuild>
-
getMavenArtifacts
@Exported public MavenArtifactRecord getMavenArtifacts()
Information about artifacts produced by Maven.
-
getEnvironment
public EnvVars getEnvironment(TaskListener log) throws IOException, InterruptedException
ExposesMAVEN_OPTS
to forked processes.See
MavenModuleSetBuild.getEnvironment(TaskListener)
for discussion.- Overrides:
getEnvironment
in classAbstractMavenBuild<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 interfaceQueue.Executable
- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classAbstractBuild<MavenModule,MavenBuild>
-
getWhyKeepLog
public String getWhyKeepLog()
If the parentMavenModuleSetBuild
is kept, keep this record, too.- Overrides:
getWhyKeepLog
in classAbstractBuild<MavenModule,MavenBuild>
-
createExecutedMojoCache
public static ExecutedMojo.Cache createExecutedMojoCache()
-
setWorkspace
protected void setWorkspace(FilePath path)
Backdoor forMavenModuleSetBuild
to assign workspaces for modules.- Overrides:
setWorkspace
in classAbstractBuild<MavenModule,MavenBuild>
-
getParent
public MavenModule getParent()
- Specified by:
getParent
in interfaceQueue.Executable
- Overrides:
getParent
in classAbstractBuild<MavenModule,MavenBuild>
-
setBuiltOnStr
protected void setBuiltOnStr(String builtOn)
- Overrides:
setBuiltOnStr
in classAbstractBuild<MavenModule,MavenBuild>
-
getMavenOpts
public String getMavenOpts(TaskListener listener, EnvVars envVars)
Description copied from class:AbstractMavenBuild
Obtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.- Specified by:
getMavenOpts
in classAbstractMavenBuild<MavenModule,MavenBuild>
envVars
- Caller must pass in the environment variables obtained fromAbstractMavenBuild.getEnvironment(TaskListener)
This method takes this as a parameter as opposed to recomputing it since the caller always have this handy.- See Also:
MavenModuleSet.getMavenOpts()
-
-