Package hudson.maven
Class MavenBuild
java.lang.Object
- All Implemented Interfaces:
ExtensionPoint,DescriptorByNameOwner,ModelObject,PersistenceRoot,Queue.Executable,Saveable,SearchableModelObject,SearchItem,AccessControlled,Comparable<MavenBuild>,Runnable,WithConsoleUrl,HistoricalBuild,LazyBuildMixIn.LazyLoadingRun<MavenModule,,MavenBuild> ModelObjectWithContextMenu,RunWithSCM<MavenModule,,MavenBuild> OnMaster,org.kohsuke.stapler.StaplerProxy
Run for MavenModule.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionstatic booleanSet true to produce debug output.protected static final ProcessCacheFields 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
ConstructorsConstructorDescriptionMavenBuild(MavenModule job) MavenBuild(MavenModule project, File buildDir) MavenBuild(MavenModule job, Calendar timestamp) -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutedMojo.CacheChangeLogSet<? extends ChangeLogSet.Entry>ExposesMAVEN_OPTSto forked processes.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 "governing"MavenModuleSetthat has set the workspace for this build.Gets theMavenModuleSetBuildthat has the same build number.AbstractBuild<?,?> The same asgetParentBuild()except that returns itself when no parent.getUpUrl()If the parentMavenModuleSetBuildis kept, keep this record, too.booleanWe always get the changeset fromMavenModuleSetBuild.voidvoidregisterAsProjectAction(MavenReporter reporter) voidrun()protected voidsetBuiltOnStr(String builtOn) protected voidsetWorkspace(FilePath path) Backdoor forMavenModuleSetBuildto assign workspaces for modules.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, getChangeSets, getCulpritIds, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getEnvironments, getHudsonVersion, getModuleRoot, getModuleRoots, getNextBuild, getParentExecutable, getPersistentActions, getPreviousBuild, getProject, getRunMixIn, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getWorkspace, shouldCalculateCulpritsMethods inherited from class hudson.model.Run
_this, canToggleLogKeep, compareTo, delete, deleteArtifacts, 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, getDuration, getDurationString, getDynamic, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getParameterValues, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getQueueId, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTarget, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, 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, 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, getEstimatedDuration, toStringMethods inherited from interface jenkins.scm.RunWithSCM
hasParticipant
-
Field Details
-
mavenProcessCache
-
debug
public static boolean debugSet true to produce debug output.
-
-
Constructor Details
-
MavenBuild
- Throws:
IOException
-
MavenBuild
-
MavenBuild
- Throws:
IOException
-
-
Method Details
-
getUpUrl
- Overrides:
getUpUrlin classAbstractBuild<MavenModule,MavenBuild>
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classRun<MavenModule,MavenBuild>
-
getParentBuild
Gets theMavenModuleSetBuildthat has the same build number.- Returns:
- null if no such build exists, which happens when the module build is manually triggered.
- See Also:
-
getRootBuild
The same asgetParentBuild()except that returns itself when no parent.- Overrides:
getRootBuildin classAbstractBuild<MavenModule,MavenBuild>
-
getModuleSetBuild
Gets the "governing"MavenModuleSetthat has set the workspace for this build.- Returns:
- null if no such build exists, which happens if the build is manually removed.
- See Also:
-
getChangeSet
- Overrides:
getChangeSetin classAbstractBuild<MavenModule,MavenBuild>
-
hasChangeSetComputed
public boolean hasChangeSetComputed()We always get the changeset fromMavenModuleSetBuild.- Overrides:
hasChangeSetComputedin classAbstractBuild<MavenModule,MavenBuild>
-
getMavenArtifacts
Information about artifacts produced by Maven. -
getEnvironment
ExposesMAVEN_OPTSto forked processes.See
MavenModuleSetBuild.getEnvironment(TaskListener)for discussion.- Overrides:
getEnvironmentin classAbstractMavenBuild<MavenModule,MavenBuild> - Throws:
IOExceptionInterruptedException
-
registerAsProjectAction
-
registerAsProjectAction
-
getProjectActionBuilders
-
getExecutedMojos
-
run
public void run()- Specified by:
runin interfaceQueue.Executable- Specified by:
runin interfaceRunnable- Specified by:
runin classAbstractBuild<MavenModule,MavenBuild>
-
getWhyKeepLog
If the parentMavenModuleSetBuildis kept, keep this record, too.- Overrides:
getWhyKeepLogin classAbstractBuild<MavenModule,MavenBuild>
-
createExecutedMojoCache
-
setWorkspace
Backdoor forMavenModuleSetBuildto assign workspaces for modules.- Overrides:
setWorkspacein classAbstractBuild<MavenModule,MavenBuild>
-
getParent
- Specified by:
getParentin interfaceQueue.Executable- Overrides:
getParentin classAbstractBuild<MavenModule,MavenBuild>
-
setBuiltOnStr
- Overrides:
setBuiltOnStrin classAbstractBuild<MavenModule,MavenBuild>
-
getMavenOpts
Description copied from class:AbstractMavenBuildObtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.- Specified by:
getMavenOptsin 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:
-