Package hudson.maven
Class MavenModuleSetBuild
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.Run<P,R>
hudson.model.AbstractBuild<P,B>
hudson.maven.AbstractMavenBuild<MavenModuleSet,MavenModuleSetBuild>
hudson.maven.MavenModuleSetBuild
- All Implemented Interfaces:
ExtensionPoint,DescriptorByNameOwner,ModelObject,PersistenceRoot,Queue.Executable,Saveable,SearchableModelObject,SearchItem,AccessControlled,Comparable<MavenModuleSetBuild>,Runnable,WithConsoleUrl,HistoricalBuild,LazyBuildMixIn.LazyLoadingRun<MavenModuleSet,,MavenModuleSetBuild> ModelObjectWithContextMenu,RunWithSCM<MavenModuleSet,,MavenModuleSetBuild> OnMaster,org.kohsuke.stapler.StaplerProxy
Build for MavenModuleSet.
A "build" of MavenModuleSet consists of:
- Update the workspace.
- Parse POMs
- Trigger module builds.
MavenBuilds are done
on this.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classwill log in theTaskListenerwhen transferFailed and transferSucceededNested classes/interfaces inherited from class hudson.model.AbstractBuild
AbstractBuild.AbstractBuildExecution, AbstractBuild.AbstractRunner, AbstractBuild.DependencyChangeNested 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.SummaryNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
FieldsFields inherited from class hudson.model.AbstractBuild
buildEnvironmentsFields 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, UPDATE, XSTREAM, XSTREAM2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()voidfindModuleBuildActions(Class<T> action) FindsActions from all the module builds that belong to thisMavenModuleSetBuild.getDynamic(String token, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) ExposesMAVEN_OPTSto forked processes.longReturns the estimated duration for this builds.Information about artifacts produced by Maven.getMavenOpts(TaskListener listener, EnvVars envVars) Obtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.Gets the version of Maven used for build.Computes the module builds that correspond to this build.Computes the latest module builds that correspond to this build.Displays the combined status of all modules.protected BooleanCheck if the current build is a release or not.protected voidonLoad()voidregisterAsProjectAction(MavenReporter reporter) voidrun()voidsetMavenVersionUsed(String mavenVersionUsed) Methods inherited from class hudson.maven.AbstractMavenBuild
expandTokensMethods inherited from class hudson.model.AbstractBuild
addAction, calculateCulprits, createReference, doStop, doStop, dropLinks, due, getAggregatedTestResultAction, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSet, getChangeSets, getCulpritIds, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getEnvironments, getHudsonVersion, getModuleRoot, getModuleRoots, getNextBuild, getParentExecutable, getPersistentActions, getPreviousBuild, getProject, getRootBuild, getRunMixIn, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getUpUrl, getWhyKeepLog, getWorkspace, hasChangeSetComputed, setBuiltOnStr, setWorkspace, shouldCalculateCulpritsMethods inherited from class hudson.model.Run
_this, canToggleLogKeep, compareTo, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doConsoleText, doDoDelete, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifactManager, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildFingerprints, getBuildsOverThreshold, getBuildStatusSummary, getCause, getCauses, getCharacteristicEnvVars, getCharset, getConsoleUrl, getDescription, getDisplayName, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getParameterValues, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getUrl, hasCustomDisplayName, hasntStartedYet, isBuilding, isInProgress, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onStartBuilding, pickArtifactManager, reload, run, save, setDescription, setDisplayName, setQueueId, setResult, submit, toString, updateSymlinks, writeLogTo, writeReplace, writeWholeLogToMethods inherited from class hudson.model.Actionable
addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.model.HistoricalBuild
getBuildStatusIconClassName, getBuildStatusUrl, getTruncatedDescriptionMethods inherited from interface hudson.model.Queue.Executable
getConsoleUrl, toStringMethods inherited from interface jenkins.scm.RunWithSCM
hasParticipant
-
Field Details
-
debug
public static boolean debugExtra verbose debug switch.
-
-
Constructor Details
-
MavenModuleSetBuild
- Throws:
IOException
-
MavenModuleSetBuild
- Throws:
IOException
-
-
Method Details
-
onLoad
protected void onLoad()- Overrides:
onLoadin classRun<MavenModuleSet,MavenModuleSetBuild>
-
getEnvironment
ExposesMAVEN_OPTSto forked processes. When we fork Maven, we do so directly by executing Java, thus this environment variable is pointless (we have to tweak JVM launch option correctly instead, which can be seen inMavenProcessFactory), but setting the environment variable explicitly is still useful in case this Maven forks other Maven processes via normal way. See HUDSON-3644.- Overrides:
getEnvironmentin classAbstractMavenBuild<MavenModuleSet,MavenModuleSetBuild> - Throws:
IOExceptionInterruptedException
-
getResult
Displays the combined status of all modules.More precisely, this picks up the status of this build itself, plus all the latest builds of the modules that belongs to this build.
- Specified by:
getResultin interfaceHistoricalBuild- Overrides:
getResultin classRun<MavenModuleSet,MavenModuleSetBuild>
-
getModuleBuilds
Computes the module builds that correspond to this build.A module may be built multiple times (by the user action), so the value is a list.
-
getEstimatedDuration
public long getEstimatedDuration()Returns the estimated duration for this builds. Takes only the modules into account which are actually being build in case of incremental builds.- Specified by:
getEstimatedDurationin interfaceQueue.Executable- Overrides:
getEstimatedDurationin classRun<MavenModuleSet,MavenModuleSetBuild> - Returns:
- the estimated duration in milliseconds
- Since:
- 1.383
-
getMavenVersionUsed
Gets the version of Maven used for build.- Returns:
- null if this build is done by earlier version of Jenkins that didn't record this information (this means the build was done by Maven2.x)
-
setMavenVersionUsed
- Throws:
IOException
-
delete
- Overrides:
deletein classRun<MavenModuleSet,MavenModuleSetBuild> - Throws:
IOException
-
deleteArtifacts
- Overrides:
deleteArtifactsin classRun<MavenModuleSet,MavenModuleSetBuild> - Throws:
IOException
-
getDynamic
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) - Overrides:
getDynamicin classRun<MavenModuleSet,MavenModuleSetBuild>
-
getMavenArtifacts
Information about artifacts produced by Maven. -
getModuleLastBuilds
Computes the latest module builds that correspond to this build. (when individual modules are built, a new ModuleSetBuild is not created, but rather the new module build falls under the previous ModuleSetBuild) -
registerAsProjectAction
-
findModuleBuildActions
FindsActions from all the module builds that belong to thisMavenModuleSetBuild. One action per oneMavenModule, and newer ones take precedence over older ones. -
run
public void run()- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable- Specified by:
runin classAbstractBuild<MavenModuleSet,MavenModuleSetBuild>
-
getDownstreamRelationship
- Overrides:
getDownstreamRelationshipin classAbstractBuild<MavenModuleSet,MavenModuleSetBuild>
-
getMavenOpts
Description copied from class:AbstractMavenBuildObtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.- Specified by:
getMavenOptsin classAbstractMavenBuild<MavenModuleSet,MavenModuleSetBuild> 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:
-
isRelease
Check if the current build is a release or not. If all its maven modules are not SNAPSHOT then it is a release- Returns:
- true if
MavenModuleSetBuildis a release - Since:
- 2.12.2
-
getParent
- Specified by:
getParentin interfaceQueue.Executable- Overrides:
getParentin classAbstractBuild<MavenModuleSet,MavenModuleSetBuild>
-