hudson.maven
Class AbstractMavenBuild<P extends AbstractMavenProject<P,B>,B extends AbstractMavenBuild<P,B>>

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<P,B>
All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ModelObject, PersistenceRoot, Queue.Executable, Saveable, SearchableModelObject, SearchItem, AccessControlled, Comparable<B>, Runnable, ModelObjectWithContextMenu, OnMaster
Direct Known Subclasses:
MavenBuild, MavenModuleSetBuild

public abstract class AbstractMavenBuild<P extends AbstractMavenProject<P,B>,B extends AbstractMavenBuild<P,B>>
extends AbstractBuild<P,B>


Nested Class Summary
 
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.Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.MenuItem
 
Field Summary
static boolean debug
          Extra verbose debug switch.
 
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, number, ORDER_BY_DATE, PERMISSIONS, project, result, state, timestamp, TREE_CUTOFF, UPDATE, XSTREAM, XSTREAM2
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
protected AbstractMavenBuild(P job)
           
  AbstractMavenBuild(P job, Calendar timestamp)
           
  AbstractMavenBuild(P project, File buildDir)
           
 
Method Summary
protected  String expandTokens(TaskListener listener, String str)
          Expand tokens with token macro.
 EnvVars getEnvironment(TaskListener log)
          Returns the map that contains environmental variables to be used for launching processes for this build.
abstract  String getMavenOpts(TaskListener listener, EnvVars envVars)
          Obtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.
 
Methods inherited from class hudson.model.AbstractBuild
doStop, doStop, due, getAggregatedTestResultAction, getBuildFingerprints, getBuildVariableResolver, getBuildVariables, getBuiltOn, getBuiltOnStr, getChangeSet, getCulprits, getDependencyChanges, getDownstreamBuilds, getDownstreamBuilds, getDownstreamRelationship, getEnvironments, getHudsonVersion, getModuleRoot, getModuleRoots, getNextBuild, getPersistentActions, getPreviousBuild, getProject, getRootBuild, getSensitiveBuildVariables, getTestResultAction, getTransitiveUpstreamBuilds, getUpstreamBuilds, getUpstreamRelationship, getUpstreamRelationshipBuild, getUpUrl, getWhyKeepLog, getWorkspace, hasChangeSetComputed, hasParticipant, run, setBuiltOnStr, setWorkspace
 
Methods inherited from class hudson.model.Run
_this, addAction, canToggleLogKeep, checkPermission, compareTo, delete, deleteArtifacts, doArtifact, doBuildNumber, doBuildStatus, doBuildTimestamp, doConfigSubmit, doConsoleText, doDoDelete, doProgressiveLog, doSubmitDescription, doToggleLogKeep, execute, fromExternalizableId, getAbsoluteUrl, getACL, getApi, getArtifacts, getArtifactsDir, getArtifactsUpTo, getBadgeActions, getBuildStatusSummary, getBuildStatusUrl, getCause, getCauses, getCharacteristicEnvVars, getCharset, getDescription, getDescriptorByName, getDisplayName, getDuration, getDurationString, getDynamic, getEnvironment, getEnvVars, getEstimatedDuration, getExecutor, getExternalizableId, getFullDisplayName, getHasArtifacts, getIconColor, getId, getIDFormatter, getLog, getLog, getLogFile, getLogInputStream, getLogReader, getLogText, getNumber, getOneOffExecutor, getParent, getPreviousBuildInProgress, getPreviousBuildsOverThreshold, getPreviousBuiltBuild, getPreviousCompletedBuild, getPreviousFailedBuild, getPreviousNotFailedBuild, getPreviousSuccessfulBuild, getResult, getRootDir, getSearchUrl, getStartTimeInMillis, getTime, getTimeInMillis, getTimestamp, getTimestampString, getTimestampString2, getTransientActions, getTruncatedDescription, getUrl, hasCustomDisplayName, hasntStartedYet, hasPermission, isBuilding, isKeepLog, isLogUpdated, keepLog, keepLog, makeSearchIndex, onEndBuilding, onLoad, onStartBuilding, reload, run, save, setDescription, setDisplayName, setResult, submit, toString, writeLogTo, writeWholeLogTo
 
Methods inherited from class hudson.model.Actionable
doContextMenu, 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, getParent, toString
 

Field Detail

debug

public static boolean debug
Extra verbose debug switch.

Constructor Detail

AbstractMavenBuild

protected AbstractMavenBuild(P job)
                      throws IOException
Throws:
IOException

AbstractMavenBuild

public AbstractMavenBuild(P job,
                          Calendar timestamp)

AbstractMavenBuild

public AbstractMavenBuild(P project,
                          File buildDir)
                   throws IOException
Throws:
IOException
Method Detail

getEnvironment

public EnvVars getEnvironment(TaskListener log)
                       throws IOException,
                              InterruptedException
Description copied from class: Run
Returns the map that contains environmental variables to be used for launching processes for this build.

BuildSteps that invoke external processes should use this. This allows BuildWrappers and other project configurations (such as JDK selection) to take effect.

Unlike earlier Run.getEnvVars(), this map contains the whole environment, not just the overrides, so one can introspect values to change its behavior.

Overrides:
getEnvironment in class AbstractBuild<P extends AbstractMavenProject<P,B>,B extends AbstractMavenBuild<P,B>>
Returns:
the map with the environmental variables. Never null.
Throws:
IOException
InterruptedException

getMavenOpts

public abstract String getMavenOpts(TaskListener listener,
                                    EnvVars envVars)
Obtains the fully resolved MAVEN_OPTS with all the tokens and variables expanded.

Parameters:
envVars - Caller must pass in the environment variables obtained from 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()

expandTokens

protected final String expandTokens(TaskListener listener,
                                    String str)
Expand tokens with token macro.



Copyright © 2004-2013. All Rights Reserved.