hudson.maven
Class MavenModuleSet

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.AbstractItem
              extended by hudson.model.Job<P,R>
                  extended by hudson.model.AbstractProject<P,R>
                      extended by hudson.maven.AbstractMavenProject<MavenModuleSet,MavenModuleSetBuild>
                          extended by hudson.maven.MavenModuleSet
All Implemented Interfaces:
ExtensionPoint, BuildableItem, BuildableItemWithBuildWrappers, Describable<TopLevelItem>, DescriptorByNameOwner, Item, ItemGroup<MavenModule>, ModelObject, PersistenceRoot, SubTask, Queue.Task, ResourceActivity, Saveable, SCMedItem, TopLevelItem, SearchableModelObject, SearchItem, AccessControlled, Maven.ProjectWithMaven, ModelObjectWithChildren, ModelObjectWithContextMenu, OnMaster, org.kohsuke.stapler.HttpDeletable, org.kohsuke.stapler.StaplerOverridable

public class MavenModuleSet
extends AbstractMavenProject<MavenModuleSet,MavenModuleSetBuild>
implements TopLevelItem, ItemGroup<MavenModule>, SCMedItem, Saveable, BuildableItemWithBuildWrappers

Group of MavenModules.

This corresponds to the group of Maven POMs that constitute a single tree of projects. This group serves as the grouping of those related modules.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class MavenModuleSet.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.maven.AbstractMavenProject
AbstractMavenProject.MavenModuleDependency
 
Nested classes/interfaces inherited from class hudson.model.AbstractProject
AbstractProject.AbstractProjectDescriptor, AbstractProject.BecauseOfBuildInProgress, AbstractProject.BecauseOfDownstreamBuildInProgress, AbstractProject.BecauseOfUpstreamBuildInProgress
 
Nested classes/interfaces inherited from class hudson.model.Job
Job.LastItemListener
 
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 MavenModuleSet.DescriptorImpl DESCRIPTOR
          Descriptor is instantiated as a field purely for backward compatibility.
protected  String globalSettingConfigPath
          Deprecated. since 1.484 settings are provided by globalSettings
 
Fields inherited from class hudson.model.AbstractProject
ABORT, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, BUILD_NOW_TEXT, builds, disabled, transientActions, triggers
 
Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties
 
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN
 
Fields inherited from interface hudson.model.Item
BUILD, CANCEL, CONFIGURE, CREATE, DELETE, DISCOVER, EXTENDED_READ, PERMISSIONS, READ, WIPEOUT, WORKSPACE
 
Constructor Summary
MavenModuleSet(ItemGroup parent, String name)
           
MavenModuleSet(String name)
          Deprecated. Use MavenModuleSet(ItemGroup, String)
 
Method Summary
protected  void addTransientActionsFromBuild(MavenModuleSetBuild build, List<Action> collection, Set<Class> added)
           
 AbstractProject<?,?> asProject()
          SCMedItem needs to be an instance of AbstractProject.
 int assignBuildNumber()
          To make it easy to grasp relationship among modules and the module set, we'll align the build numbers of all the modules.
protected  void buildDependencyGraph(DependencyGraph graph)
          Builds the dependency graph.
 Indenter<MavenModule> createIndenter()
           
protected  List<Action> createTransientActions()
           
 FormValidation doCheckFileInWorkspace(String value)
          Check the location of the POM, alternate settings file, etc - any file.
 ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Generates the context menu to list up all the children.
 org.kohsuke.stapler.HttpResponse doDoDeleteAllDisabledModules()
          Delete all disabled modules.
 Collection<Job> getAllJobs()
          Gets all the jobs that this Item contains as descendants.
 String getAlternateSettings()
          Deprecated. as of 1.481
 List<Queue.Item> getApproximateQueueItemsQuickly()
          Returns the MavenModules that are in the queue.
protected  Class<MavenModuleSetBuild> getBuildClass()
          Determines Class<R>.
 DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappers()
          Deprecated. as of 1.335 Use getBuildWrappersList() to be consistent with other subtypes of AbstractProject.
 DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
          BuildWrappers associated with this AbstractProject.
 MavenModuleSet.DescriptorImpl getDescriptor()
          Gets the descriptor for this instance.
 List<MavenModule> getDisabledModules(boolean disabled)
          Possibly empty list of all disabled modules (if disabled==true) or all enabeld modules (if disabled==false)
 Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
protected  List<MavenModuleSetBuild> getEstimatedDurationCandidates()
          Returns candidate build for calculating the estimated duration of the current run.
 LocalRepositoryLocator getExplicitLocalRepository()
          Undefaulted locally configured value with taking inheritance from the global configuration into account.
 GlobalSettingsProvider getGlobalSettings()
           
 String getGoals()
          Gets the list of goals to execute.
 MavenModule getItem(String name)
          Gets the Item inside this group that has a given name, or null if it does not exist.
 Collection<MavenModule> getItems()
          Gets all the items in this collection in a read-only view.
 LocalRepositoryLocator getLocalRepository()
           
 Maven.MavenInstallation getMaven()
          Gets the Maven to invoke.
 String getMavenOpts()
          Possibly null, whitespace-separated (including TAB, NL, etc) VM options to be used to launch Maven process.
 Properties getMavenProperties()
          Gets the system properties explicitly set in the Maven command line (the "-D" option.)
 int getMavenValidationLevel()
           
 MavenModule getModule(String name)
           
 Collection<MavenModule> getModules()
           
 DescribableList<Builder,Descriptor<Builder>> getPostbuilders()
          Builders that are run after the main Maven execution.
 DescribableList<Builder,Descriptor<Builder>> getPrebuilders()
          Builders that are run before the main Maven execution.
 String getProfiles()
          If the list of configured goals contain the "-P" option, return the configured profiles.
 String getPronoun()
          Get the term used in the UI to represent this kind of AbstractProject.
 DescribableList<Publisher,Descriptor<Publisher>> getPublishers()
          List of active Publishers.
 DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
          Returns the live list of all Publishers configured for this project.
 List<Queue.Item> getQueueItems()
          Returns the MavenModules that are in the queue.
 DescribableList<MavenReporter,Descriptor<MavenReporter>> getReporters()
          List of active MavenReporters that should be applied to all module builds.
protected  Set<ResourceActivity> getResourceActivities()
          Set of child resource activities of the build of this project (override in child projects).
 File getRootDirFor(MavenModule child)
          Assigns the root directory for children.
 MavenModule getRootModule()
           
 String getRootPOM()
          Deprecated. for backward comp only
 String getRootPOM(EnvVars env)
          Gets the location of top-level pom.xml relative to the workspace root.
 Result getRunPostStepsIfResult()
          postbuilders are run if the result is better or equal to this threshold.
 SettingsProvider getSettings()
           
 String getUrlChildPrefix()
          Gets the URL token that prefixes the URLs for child Items.
 String getUserConfiguredGoals()
          Gets the list of goals specified by the user, without taking inheritance and POM default goals into account.
 boolean hasDisabledModule()
          Returns true if there's any disabled module.
 boolean ignoreUpstremChanges()
           
 Maven.MavenInstallation inferMavenInstallation()
          Gets the Maven.MavenInstallation associated with the project.
 boolean isAggregatorStyleBuild()
           
 boolean isArchivingDisabled()
           
 boolean isDisableTriggerDownstreamProjects()
           
 boolean isFingerprintConfigured()
          True if the builds of this project produces Fingerprint records.
 boolean isIncrementalBuild()
           
 boolean isNonRecursive()
          Check for "-N" or "--non-recursive" in the Maven goals/options.
 boolean isPerModuleEmail()
           
 boolean isProcessPlugins()
           
 boolean isResolveDependencies()
           
 void logRotate()
          Perform log rotation.
protected  SearchIndexBuilder makeSearchIndex()
          Default implementation that returns empty index.
 void onDeleted(MavenModule item)
          Internal method.
 void onLoad(ItemGroup<? extends Item> parent, String name)
          Called right after when a Item is loaded from disk.
 void onRenamed(MavenModule item, String oldName, String newName)
          Internal method.
 Object readResolve()
           
 boolean runHeadless()
           
 void setAggregatorStyleBuild(boolean aggregatorStyleBuild)
           
 void setAlternateSettings(String alternateSettings)
          Deprecated. as of 1.481
 void setDisableTriggerDownstreamProjects(boolean disableTriggerDownstreamProjects)
           
 void setGlobalSettings(GlobalSettingsProvider globalSettings)
           
 void setGoals(String goals)
           
 void setIgnoreUpstremChanges(boolean ignoreUpstremChanges)
           
 void setIncrementalBuild(boolean incrementalBuild)
           
 void setIsArchivingDisabled(boolean archivingDisabled)
           
 void setLocalRepository(LocalRepositoryLocator localRepository)
           
 void setMaven(String mavenName)
           
 void setMavenOpts(String mavenOpts)
          Set mavenOpts.
 void setProcessPlugins(boolean processPlugins)
           
 void setResolveDependencies(boolean resolveDependencies)
           
 void setRootPOM(String rootPOM)
           
 void setRunHeadless(boolean runHeadless)
           
 void setRunPostStepsIfResult(Result v)
           
 void setSettings(SettingsProvider settings)
           
 void setUsePrivateRepository(boolean usePrivateRepository)
          Deprecated. as of 1.448. Use setLocalRepository(LocalRepositoryLocator) instead
protected  void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Derived class can override this to perform additional config submission work.
protected  void updateTransientActions()
          effectively deprecated.
 boolean usesPrivateRepository()
          Deprecated. as of 1.448 Use getLocalRepository()
 
Methods inherited from class hudson.model.AbstractProject
_getRuns, addProperty, addToList, addTrigger, blockBuildWhenDownstreamBuilding, blockBuildWhenUpstreamBuilding, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, createHistoryWidget, disable, doBuild, doBuild, doBuildWithParameters, doBuildWithParameters, doCancelQueue, doCheckRetryCount, doConfigSubmit, doDisable, doDoDelete, doDoWipeOutWorkspace, doEnable, doPolling, doRssChangelog, doWs, enable, findNearest, findNearest, getActions, getAssignedLabel, getAssignedLabelString, getAuthToken, getBuild, getBuildByNumber, getBuildingDownstream, getBuildingUpstream, getBuildNowText, getBuildTriggerUpstreamProjects, getCauseOfBlockage, getCustomWorkspace, getDefaultAuthentication, getDelay, getDownstreamProjects, getEnvironment, getFirstBuild, getHasCustomQuietPeriod, getIconColor, getJDK, getLastBuild, getLastBuiltOn, getModuleRoot, getModuleRoots, getNearestBuild, getNearestOldBuild, getOwnerTask, getProminentActions, getQueueItem, getQuietPeriod, getRelationship, getRelevantLabels, getResourceList, getRootProject, getSameNodeConstraint, getScm, getScmCheckoutRetryCount, getScmCheckoutStrategy, getSomeBuildWithWorkspace, getSomeWorkspace, getSubTasks, getTransitiveDownstreamProjects, getTransitiveUpstreamProjects, getTrigger, getTriggers, getUpstreamProjects, getWhyBlocked, getWorkspace, getWorkspaceResource, hasAbortPermission, hasCustomScmCheckoutRetryCount, hasParticipant, isBuildable, isBuildBlocked, isConcurrentBuild, isConfigurable, isDisabled, isInQueue, isParameterized, loadBuild, makeDisabled, newBuild, onCreatedFromScratch, performDelete, poll, pollSCMChanges, removeFromList, removeRun, removeTrigger, resolveForCLI, save, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild2, scheduleBuild2, scheduleBuild2, scheduleBuild2, schedulePolling, setAssignedLabel, setAssignedNode, setBlockBuildWhenDownstreamBuilding, setBlockBuildWhenUpstreamBuilding, setConcurrentBuild, setCustomWorkspace, setJDK, setQuietPeriod, setScm, setScmCheckoutStrategy, supportsMakeDisabled, triggers
 
Methods inherited from class hudson.model.Job
delete, doBuildStatus, doDescription, doDoRename, doRssAll, doRssFailed, getACL, getAllProperties, getBuildDir, getBuildDiscarder, getBuildForCLI, getBuildHealth, getBuildHealthReports, getBuilds, getBuilds, getBuildsAsMap, getBuildsByTimestamp, getBuildStatusUrl, getBuildTimeGraph, getCharacteristicEnvVars, getEstimatedDuration, getLastBuildsOverThreshold, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLastUnstableBuild, getLastUnsuccessfulBuild, getLogRotator, getNewBuilds, getNextBuildNumber, getOverrides, getPermalinks, getProperties, getProperty, getProperty, getTimeline, getWidgets, isBuilding, isHoldOffBuildUntilSave, isKeepDependencies, isLogUpdated, isNameEditable, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setBuildDiscarder, setLogRotator, supportsLogRotator, updateNextBuildNumber
 
Methods inherited from class hudson.model.AbstractItem
checkPermission, delete, doConfigDotXml, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml
 
Methods inherited from class hudson.model.Actionable
addAction, doContextMenu, getAction, getAction, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, 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.ItemGroup
getFullDisplayName, getFullName, getUrl
 
Methods inherited from interface hudson.model.SCMedItem
getScm, poll, pollSCMChanges
 
Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild
 
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch
 
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
 
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
 
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
 
Methods inherited from interface hudson.security.AccessControlled
checkPermission, getACL, hasPermission
 
Methods inherited from interface hudson.model.Queue.Task
checkAbortPermission, getCauseOfBlockage, getDefaultAuthentication, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked, isConcurrentBuild
 
Methods inherited from interface hudson.model.queue.SubTask
createExecutable, getAssignedLabel, getEstimatedDuration, getLastBuiltOn, getOwnerTask, getSameNodeConstraint
 
Methods inherited from interface hudson.model.ResourceActivity
getDisplayName, getResourceList
 

Field Detail

globalSettingConfigPath

protected transient String globalSettingConfigPath
Deprecated. since 1.484 settings are provided by globalSettings
used temporary during maven build to store file path

Since:
1.426

DESCRIPTOR

@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension(ordinal=900.0)
public static final MavenModuleSet.DescriptorImpl DESCRIPTOR
Descriptor is instantiated as a field purely for backward compatibility. Do not do this in your code. Put @Extension on your DescriptorImpl class instead.

Constructor Detail

MavenModuleSet

public MavenModuleSet(String name)
Deprecated. Use MavenModuleSet(ItemGroup, String)


MavenModuleSet

public MavenModuleSet(ItemGroup parent,
                      String name)
Method Detail

readResolve

public Object readResolve()
Since:
1.491

getPrebuilders

public DescribableList<Builder,Descriptor<Builder>> getPrebuilders()
Builders that are run before the main Maven execution.

Since:
1.433

getPostbuilders

public DescribableList<Builder,Descriptor<Builder>> getPostbuilders()
Builders that are run after the main Maven execution.

Since:
1.433

getRunPostStepsIfResult

public Result getRunPostStepsIfResult()
postbuilders are run if the result is better or equal to this threshold.

Returns:
never null
Since:
1.433

setRunPostStepsIfResult

public void setRunPostStepsIfResult(Result v)

getUrlChildPrefix

public String getUrlChildPrefix()
Description copied from interface: ItemGroup
Gets the URL token that prefixes the URLs for child Items. Like "job", "item", etc.

Specified by:
getUrlChildPrefix in interface ItemGroup<MavenModule>

getItems

public Collection<MavenModule> getItems()
Description copied from interface: ItemGroup
Gets all the items in this collection in a read-only view.

Specified by:
getItems in interface ItemGroup<MavenModule>

getModules

@Exported
public Collection<MavenModule> getModules()

getItem

public MavenModule getItem(String name)
Description copied from interface: ItemGroup
Gets the Item inside this group that has a given name, or null if it does not exist.

Specified by:
getItem in interface ItemGroup<MavenModule>

getModule

public MavenModule getModule(String name)

getPronoun

public String getPronoun()
Description copied from class: AbstractProject
Get the term used in the UI to represent this kind of AbstractProject. Must start with a capital letter.

Overrides:
getPronoun in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

updateTransientActions

protected void updateTransientActions()
Description copied from class: AbstractProject
effectively deprecated. Since using updateTransientActions correctly under concurrent environment requires a lock that can too easily cause deadlocks.

Override AbstractProject.createTransientActions() instead.

Overrides:
updateTransientActions in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

createTransientActions

protected List<Action> createTransientActions()
Overrides:
createTransientActions in class AbstractMavenProject<MavenModuleSet,MavenModuleSetBuild>

addTransientActionsFromBuild

protected void addTransientActionsFromBuild(MavenModuleSetBuild build,
                                            List<Action> collection,
                                            Set<Class> added)
Specified by:
addTransientActionsFromBuild in class AbstractMavenProject<MavenModuleSet,MavenModuleSetBuild>
collection - Add the transient actions to this collection.

hasDisabledModule

public boolean hasDisabledModule()
Returns true if there's any disabled module.


getDisabledModules

public List<MavenModule> getDisabledModules(boolean disabled)
Possibly empty list of all disabled modules (if disabled==true) or all enabeld modules (if disabled==false)


createIndenter

public Indenter<MavenModule> createIndenter()

isIncrementalBuild

public boolean isIncrementalBuild()

isAggregatorStyleBuild

public boolean isAggregatorStyleBuild()

usesPrivateRepository

public boolean usesPrivateRepository()
Deprecated. as of 1.448 Use getLocalRepository()


isPerModuleEmail

public boolean isPerModuleEmail()

ignoreUpstremChanges

public boolean ignoreUpstremChanges()

runHeadless

public boolean runHeadless()

isArchivingDisabled

public boolean isArchivingDisabled()

setIncrementalBuild

public void setIncrementalBuild(boolean incrementalBuild)

setAggregatorStyleBuild

public void setAggregatorStyleBuild(boolean aggregatorStyleBuild)

setUsePrivateRepository

public void setUsePrivateRepository(boolean usePrivateRepository)
Deprecated. as of 1.448. Use setLocalRepository(LocalRepositoryLocator) instead


getLocalRepository

public LocalRepositoryLocator getLocalRepository()
Returns:
never null

getExplicitLocalRepository

public LocalRepositoryLocator getExplicitLocalRepository()
Undefaulted locally configured value with taking inheritance from the global configuration into account.


setLocalRepository

public void setLocalRepository(LocalRepositoryLocator localRepository)

setSettings

public void setSettings(SettingsProvider settings)
Since:
1.491

setGlobalSettings

public void setGlobalSettings(GlobalSettingsProvider globalSettings)
Since:
1.491

setIgnoreUpstremChanges

public void setIgnoreUpstremChanges(boolean ignoreUpstremChanges)

setRunHeadless

public void setRunHeadless(boolean runHeadless)

setIsArchivingDisabled

public void setIsArchivingDisabled(boolean archivingDisabled)

isResolveDependencies

public boolean isResolveDependencies()

setResolveDependencies

public void setResolveDependencies(boolean resolveDependencies)

isProcessPlugins

public boolean isProcessPlugins()

setProcessPlugins

public void setProcessPlugins(boolean processPlugins)

getMavenValidationLevel

public int getMavenValidationLevel()

getSettings

public SettingsProvider getSettings()
Since:
1.481

getGlobalSettings

public GlobalSettingsProvider getGlobalSettings()
Since:
1.481

getReporters

public DescribableList<MavenReporter,Descriptor<MavenReporter>> getReporters()
List of active MavenReporters that should be applied to all module builds.


getPublishers

public DescribableList<Publisher,Descriptor<Publisher>> getPublishers()
List of active Publishers. Can be empty but never null.


getPublishersList

public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
Description copied from class: AbstractProject
Returns the live list of all Publishers configured for this project.

This method couldn't be called getPublishers() because existing methods in sub-classes return different inconsistent types.

Specified by:
getPublishersList in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

getBuildWrappersList

public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
Description copied from interface: BuildableItemWithBuildWrappers
BuildWrappers associated with this AbstractProject.

Specified by:
getBuildWrappersList in interface BuildableItemWithBuildWrappers
Returns:
can be empty but never null. This list is live, and changes to it will be reflected to the project configuration.

getBuildWrappers

public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappers()
Deprecated. as of 1.335 Use getBuildWrappersList() to be consistent with other subtypes of AbstractProject.

List of active BuildWrappers. Can be empty but never null.


getDynamic

public Object getDynamic(String token,
                         org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
getDynamic in class Job<MavenModuleSet,MavenModuleSetBuild>

getRootDirFor

public File getRootDirFor(MavenModule child)
Description copied from interface: ItemGroup
Assigns the root directory for children.

Specified by:
getRootDirFor in interface ItemGroup<MavenModule>

onRenamed

public void onRenamed(MavenModule item,
                      String oldName,
                      String newName)
               throws IOException
Description copied from interface: ItemGroup
Internal method. Called by Items when they are renamed by users.

Specified by:
onRenamed in interface ItemGroup<MavenModule>
Throws:
IOException

onDeleted

public void onDeleted(MavenModule item)
               throws IOException
Description copied from interface: ItemGroup
Internal method. Called by Items when they are deleted by users.

Specified by:
onDeleted in interface ItemGroup<MavenModule>
Throws:
IOException

getAllJobs

public Collection<Job> getAllJobs()
Description copied from class: AbstractItem
Gets all the jobs that this Item contains as descendants.

Specified by:
getAllJobs in interface Item
Overrides:
getAllJobs in class Job<MavenModuleSet,MavenModuleSetBuild>

getBuildClass

protected Class<MavenModuleSetBuild> getBuildClass()
Description copied from class: AbstractProject
Determines Class<R>.

Specified by:
getBuildClass in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

makeSearchIndex

protected SearchIndexBuilder makeSearchIndex()
Description copied from class: AbstractModelObject
Default implementation that returns empty index.

Overrides:
makeSearchIndex in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

isFingerprintConfigured

public boolean isFingerprintConfigured()
Description copied from class: AbstractProject
True if the builds of this project produces Fingerprint records.

Specified by:
isFingerprintConfigured in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>

onLoad

public void onLoad(ItemGroup<? extends Item> parent,
                   String name)
            throws IOException
Description copied from class: AbstractItem
Called right after when a Item is loaded from disk. This is an opporunity to do a post load processing.

Specified by:
onLoad in interface Item
Overrides:
onLoad in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>
name - Name of the directory (not a path --- just the name portion) from which the configuration was loaded. This usually becomes the name of this item.
Throws:
IOException

assignBuildNumber

public int assignBuildNumber()
                      throws IOException
To make it easy to grasp relationship among modules and the module set, we'll align the build numbers of all the modules.

This method is invoked from Executor.run(), and because of the mutual exclusion among MavenModuleSetBuild and MavenBuild, we can safely touch all the modules.

Overrides:
assignBuildNumber in class Job<MavenModuleSet,MavenModuleSetBuild>
Throws:
IOException

logRotate

public void logRotate()
               throws IOException,
                      InterruptedException
Description copied from class: Job
Perform log rotation.

Overrides:
logRotate in class Job<MavenModuleSet,MavenModuleSetBuild>
Throws:
IOException
InterruptedException

buildDependencyGraph

protected void buildDependencyGraph(DependencyGraph graph)
Description copied from class: AbstractProject
Builds the dependency graph.

Specified by:
buildDependencyGraph in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>
See Also:
DependencyGraph

isDisableTriggerDownstreamProjects

public boolean isDisableTriggerDownstreamProjects()

setDisableTriggerDownstreamProjects

public void setDisableTriggerDownstreamProjects(boolean disableTriggerDownstreamProjects)

getRootModule

public MavenModule getRootModule()

inferMavenInstallation

public Maven.MavenInstallation inferMavenInstallation()
Description copied from interface: Maven.ProjectWithMaven
Gets the Maven.MavenInstallation associated with the project. Can be null.

If the Maven installation can not be uniquely determined, it's often better to return just one of them, rather than returning null, since this method is currently ultimately only used to decide where to parse conf/settings.xml from.

Specified by:
inferMavenInstallation in interface Maven.ProjectWithMaven

getResourceActivities

protected Set<ResourceActivity> getResourceActivities()
Description copied from class: AbstractProject
Set of child resource activities of the build of this project (override in child projects).

Overrides:
getResourceActivities in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>
Returns:
The set of child resource activities of the build of this project.

getRootPOM

public String getRootPOM()
Deprecated. for backward comp only


getRootPOM

public String getRootPOM(EnvVars env)
Gets the location of top-level pom.xml relative to the workspace root.

Since:
1.467

setRootPOM

public void setRootPOM(String rootPOM)

asProject

public AbstractProject<?,?> asProject()
Description copied from interface: SCMedItem
SCMedItem needs to be an instance of AbstractProject.

This method must be always implemented as (AbstractProject)this, but defining this method emphasizes the fact that this cast must be doable.

Specified by:
asProject in interface BuildableItemWithBuildWrappers
Specified by:
asProject in interface SCMedItem

getGoals

public String getGoals()
Gets the list of goals to execute.


setGoals

public void setGoals(String goals)

getAlternateSettings

public String getAlternateSettings()
Deprecated. as of 1.481

Gets the workspace-relative path to an alternative Maven settings.xml file.


setAlternateSettings

public void setAlternateSettings(String alternateSettings)
                          throws IOException
Deprecated. as of 1.481

Sets the workspace-relative path to an alternative Maven settings.xml file.

Throws:
IOException

getProfiles

public String getProfiles()
If the list of configured goals contain the "-P" option, return the configured profiles. Otherwise null.


getMavenProperties

public Properties getMavenProperties()
Gets the system properties explicitly set in the Maven command line (the "-D" option.)


isNonRecursive

public boolean isNonRecursive()
Check for "-N" or "--non-recursive" in the Maven goals/options.


getMavenOpts

public String getMavenOpts()
Possibly null, whitespace-separated (including TAB, NL, etc) VM options to be used to launch Maven process. If mavenOpts is null or empty, we'll return the globally-defined MAVEN_OPTS.

This method returns a configured value as-is, which can include variabl references. At runtime, use AbstractMavenBuild.getMavenOpts(TaskListener, EnvVars) to obtain a fully resolved value.


setMavenOpts

public void setMavenOpts(String mavenOpts)
Set mavenOpts.


getMaven

public Maven.MavenInstallation getMaven()
Gets the Maven to invoke. If null, we pick any random Maven installation.


setMaven

public void setMaven(String mavenName)

getQueueItems

public List<Queue.Item> getQueueItems()
Returns the MavenModules that are in the queue.


getApproximateQueueItemsQuickly

public List<Queue.Item> getApproximateQueueItemsQuickly()
Returns the MavenModules that are in the queue.


getUserConfiguredGoals

public String getUserConfiguredGoals()
Gets the list of goals specified by the user, without taking inheritance and POM default goals into account.

This is only used to present the UI screen, and in all the other cases getGoals() should be used.


getEstimatedDurationCandidates

protected List<MavenModuleSetBuild> getEstimatedDurationCandidates()
Description copied from class: Job
Returns candidate build for calculating the estimated duration of the current run. Returns the 3 last successful (stable or unstable) builds, if there are any. Failing to find 3 of those, it will return up to 3 last unsuccessful builds. In any case it will not go more than 6 builds into the past to avoid costly build loading.

Overrides:
getEstimatedDurationCandidates in class Job<MavenModuleSet,MavenModuleSetBuild>

submit

protected void submit(org.kohsuke.stapler.StaplerRequest req,
                      org.kohsuke.stapler.StaplerResponse rsp)
               throws IOException,
                      javax.servlet.ServletException,
                      Descriptor.FormException
Description copied from class: Job
Derived class can override this to perform additional config submission work.

Overrides:
submit in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>
Throws:
IOException
javax.servlet.ServletException
Descriptor.FormException

doDoDeleteAllDisabledModules

public org.kohsuke.stapler.HttpResponse doDoDeleteAllDisabledModules()
                                                              throws IOException,
                                                                     InterruptedException
Delete all disabled modules.

Throws:
IOException
InterruptedException

doCheckFileInWorkspace

public FormValidation doCheckFileInWorkspace(@QueryParameter
                                             String value)
                                      throws IOException,
                                             javax.servlet.ServletException
Check the location of the POM, alternate settings file, etc - any file.

Throws:
IOException
javax.servlet.ServletException

doChildrenContextMenu

public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request,
                                                                    org.kohsuke.stapler.StaplerResponse response)
                                                             throws Exception
Description copied from interface: ModelObjectWithChildren
Generates the context menu to list up all the children.

Specified by:
doChildrenContextMenu in interface ModelObjectWithChildren
Overrides:
doChildrenContextMenu in class AbstractProject<MavenModuleSet,MavenModuleSetBuild>
Throws:
Exception

getDescriptor

public MavenModuleSet.DescriptorImpl getDescriptor()
Description copied from interface: Describable
Gets the descriptor for this instance.

Descriptor is a singleton for every concrete Describable implementation, so if a.getClass()==b.getClass() then a.getDescriptor()==b.getDescriptor() must hold.

Specified by:
getDescriptor in interface Describable<TopLevelItem>
Specified by:
getDescriptor in interface TopLevelItem
See Also:
Describable.getDescriptor()


Copyright © 2004-2013. All Rights Reserved.