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
,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.
MavenBuild
s are done
on this.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
will log in theTaskListener
when transferFailed and transferSucceededNested 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 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, UPDATE, XSTREAM, XSTREAM2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
void
findModuleBuildActions
(Class<T> action) FindsAction
s from all the module builds that belong to thisMavenModuleSetBuild
.getDynamic
(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) ExposesMAVEN_OPTS
to forked processes.long
Returns 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 Boolean
Check if the current build is a release or not.protected void
onLoad()
void
registerAsProjectAction
(MavenReporter reporter) void
run()
void
setMavenVersionUsed
(String mavenVersionUsed) 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, 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, shouldCalculateCulprits
Methods inherited from class hudson.model.Run
_this, canToggleLogKeep, compareTo, 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, getDisplayName, getDuration, getDurationString, getEnvironment, getEnvVars, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getTruncatedDescription, 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, 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
toString
Methods 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:
onLoad
in classRun<MavenModuleSet,
MavenModuleSetBuild>
-
getEnvironment
ExposesMAVEN_OPTS
to 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:
getEnvironment
in classAbstractMavenBuild<MavenModuleSet,
MavenModuleSetBuild> - Throws:
IOException
InterruptedException
-
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.
- Overrides:
getResult
in 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:
getEstimatedDuration
in interfaceQueue.Executable
- Overrides:
getEstimatedDuration
in 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:
delete
in classRun<MavenModuleSet,
MavenModuleSetBuild> - Throws:
IOException
-
deleteArtifacts
- Overrides:
deleteArtifacts
in classRun<MavenModuleSet,
MavenModuleSetBuild> - Throws:
IOException
-
getDynamic
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) - Overrides:
getDynamic
in 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
FindsAction
s 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:
run
in interfaceQueue.Executable
- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classAbstractBuild<MavenModuleSet,
MavenModuleSetBuild>
-
getDownstreamRelationship
- Overrides:
getDownstreamRelationship
in classAbstractBuild<MavenModuleSet,
MavenModuleSetBuild>
-
getMavenOpts
Description copied from class:AbstractMavenBuild
Obtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.- Specified by:
getMavenOpts
in 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
MavenModuleSetBuild
is a release - Since:
- 2.12.2
-
getParent
- Specified by:
getParent
in interfaceQueue.Executable
- Overrides:
getParent
in classAbstractBuild<MavenModuleSet,
MavenModuleSetBuild>
-