Package org.apache.maven.execution
Class DefaultMavenExecutionRequest
java.lang.Object
org.apache.maven.execution.DefaultMavenExecutionRequest
- All Implemented Interfaces:
MavenExecutionRequest
-
Field Summary
Fields inherited from interface org.apache.maven.execution.MavenExecutionRequest
CHECKSUM_POLICY_FAIL, CHECKSUM_POLICY_WARN, LOGGING_LEVEL_DEBUG, LOGGING_LEVEL_DISABLED, LOGGING_LEVEL_ERROR, LOGGING_LEVEL_FATAL, LOGGING_LEVEL_INFO, LOGGING_LEVEL_WARN, REACTOR_FAIL_AT_END, REACTOR_FAIL_FAST, REACTOR_FAIL_NEVER, REACTOR_MAKE_BOTH, REACTOR_MAKE_DOWNSTREAM, REACTOR_MAKE_UPSTREAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddActiveProfile(String profile) addActiveProfiles(List<String> profiles) addInactiveProfile(String profile) addInactiveProfiles(List<String> profiles) addPluginArtifactRepository(ArtifactRepository repository) addPluginGroup(String pluginGroup) addPluginGroups(List<String> pluginGroups) addProfile(Profile profile) addRemoteRepository(ArtifactRepository repository) static MavenExecutionRequestcopy(MavenExecutionRequest original) Controls theBuilderused by Maven by specification of the builders id.getData()intgetGoals()intDeprecated.getPom()Return the requested activation(s) of profile(s) in this execution.Return the requested activation(s) of project(s) in this execution.org.eclipse.aether.RepositoryCacheGets the root directory of the top project, which is the parent directory containing the.mvndirectory or apom.xmlfile with theroot="true"attribute.Gets the system properties to use for interpolation and profile activation.Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.org.eclipse.aether.transfer.TransferListenerGets the user properties to use for interpolation and profile activation.org.eclipse.aether.repository.WorkspaceReaderbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisResume()booleanbooleanbooleansetActiveProfiles(List<String> activeProfiles) setBaseDirectory(File basedir) setBuilderId(String builderId) Controls theBuilderused by Maven by specification of the builder's id.setCacheNotFound(boolean cacheNotFound) setCacheTransferError(boolean cacheTransferError) voidsetDegreeOfConcurrency(int degreeOfConcurrency) Set's the parallel degree of concurrency used by the build.setEventSpyDispatcher(EventSpyDispatcher eventSpyDispatcher) setExcludedProjects(List<String> excludedProjects) setExecutionListener(ExecutionListener executionListener) setGlobalChecksumPolicy(String globalChecksumPolicy) setGlobalSettingsFile(File globalSettingsFile) setGlobalToolchainsFile(File globalToolchainsFile) setIgnoreInvalidArtifactDescriptor(boolean ignoreInvalid) setIgnoreMissingArtifactDescriptor(boolean ignoreMissing) setInactiveProfiles(List<String> inactiveProfiles) setInteractiveMode(boolean interactive) setLocalRepository(ArtifactRepository localRepository) setLocalRepositoryPath(File localRepository) setLocalRepositoryPath(String localRepository) setLoggingLevel(int loggingLevel) setMakeBehavior(String makeBehavior) setMirrors(List<Mirror> mirrors) voidsetMultiModuleProjectDirectory(File directory) Deprecated.setNoSnapshotUpdates(boolean noSnapshotUpdates) setOffline(boolean offline) setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories) setPluginGroups(List<String> pluginGroups) setPomFile(String pomFilename) Deprecated.setProfiles(List<Profile> profiles) voidsetProjectBuildingConfiguration(ProjectBuildingRequest projectBuildingConfiguration) setProjectPresent(boolean projectPresent) setProjectSettingsFile(File projectSettingsFile) setProxies(List<Proxy> proxies) setReactorFailureBehavior(String failureBehavior) setRecursive(boolean recursive) setRemoteRepositories(List<ArtifactRepository> remoteRepositories) Set a new list of remote repositories to use the execution request.setRepositoryCache(org.eclipse.aether.RepositoryCache repositoryCache) setResume(boolean resume) Sets whether the build should be resumed from the data in the resume.properties file.setResumeFrom(String project) setRootDirectory(Path rootDirectory) Sets the root directory of the project.setSelectedProjects(List<String> selectedProjects) setServers(List<Server> servers) setShowErrors(boolean showErrors) setStartTime(Date startTime) setSystemProperties(Properties properties) Sets the system properties to use for interpolation and profile activation.setToolchains(Map<String, List<ToolchainModel>> toolchains) setTopDirectory(Path topDirectory) Sets the top directory of the project.setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener) setUpdateSnapshots(boolean updateSnapshots) setUseLegacyLocalRepository(boolean useLegacyLocalRepositoryManager) setUseReactor(boolean reactorActive) setUserProperties(Properties userProperties) Sets the user properties to use for interpolation and profile activation.setUserSettingsFile(File userSettingsFile) setUserToolchainsFile(File userToolchainsFile) setWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader workspaceReader) boolean
-
Constructor Details
-
DefaultMavenExecutionRequest
public DefaultMavenExecutionRequest()
-
-
Method Details
-
copy
-
getBaseDirectory
- Specified by:
getBaseDirectoryin interfaceMavenExecutionRequest
-
getLocalRepository
- Specified by:
getLocalRepositoryin interfaceMavenExecutionRequest
-
getLocalRepositoryPath
- Specified by:
getLocalRepositoryPathin interfaceMavenExecutionRequest
-
getGoals
- Specified by:
getGoalsin interfaceMavenExecutionRequest
-
getSystemProperties
Description copied from interface:MavenExecutionRequestGets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment likeSystem.getProperties()and environment variables.- Specified by:
getSystemPropertiesin interfaceMavenExecutionRequest- Returns:
- The system properties, never
null.
-
getUserProperties
Description copied from interface:MavenExecutionRequestGets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the-Dkey=valueparameter on the command line.- Specified by:
getUserPropertiesin interfaceMavenExecutionRequest- Returns:
- The user properties, never
null.
-
getPom
- Specified by:
getPomin interfaceMavenExecutionRequest
-
getReactorFailureBehavior
- Specified by:
getReactorFailureBehaviorin interfaceMavenExecutionRequest
-
getSelectedProjects
- Specified by:
getSelectedProjectsin interfaceMavenExecutionRequest
-
getExcludedProjects
- Specified by:
getExcludedProjectsin interfaceMavenExecutionRequest- Returns:
- the excluded projects, never
null
-
isResume
public boolean isResume()- Specified by:
isResumein interfaceMavenExecutionRequest- Returns:
- Whether the build should be resumed from the data in the resume.properties file.
-
getResumeFrom
- Specified by:
getResumeFromin interfaceMavenExecutionRequest
-
getMakeBehavior
- Specified by:
getMakeBehaviorin interfaceMavenExecutionRequest
-
getStartTime
- Specified by:
getStartTimein interfaceMavenExecutionRequest
-
isShowErrors
public boolean isShowErrors()- Specified by:
isShowErrorsin interfaceMavenExecutionRequest
-
isInteractiveMode
public boolean isInteractiveMode()- Specified by:
isInteractiveModein interfaceMavenExecutionRequest
-
setActiveProfiles
- Specified by:
setActiveProfilesin interfaceMavenExecutionRequest
-
setInactiveProfiles
- Specified by:
setInactiveProfilesin interfaceMavenExecutionRequest
-
getProjectActivation
Description copied from interface:MavenExecutionRequestReturn the requested activation(s) of project(s) in this execution.- Specified by:
getProjectActivationin interfaceMavenExecutionRequest- Returns:
- requested (de-)activation(s) of project(s) in this execution. Never
null.
-
getProfileActivation
Description copied from interface:MavenExecutionRequestReturn the requested activation(s) of profile(s) in this execution.- Specified by:
getProfileActivationin interfaceMavenExecutionRequest- Returns:
- requested (de-)activation(s) of profile(s) in this execution. Never
null.
-
setRemoteRepositories
Description copied from interface:MavenExecutionRequestSet a new list of remote repositories to use the execution request. This is necessary if you perform transformations on the remote repositories being used. For example if you replace existing repositories with mirrors then it's easier to just replace the whole list with a new list of transformed repositories.- Specified by:
setRemoteRepositoriesin interfaceMavenExecutionRequest- Returns:
- This request, never
null.
-
setPluginArtifactRepositories
public MavenExecutionRequest setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories) - Specified by:
setPluginArtifactRepositoriesin interfaceMavenExecutionRequest
-
setProjectBuildingConfiguration
-
getActiveProfiles
- Specified by:
getActiveProfilesin interfaceMavenExecutionRequest- Returns:
- The list of profiles that the user wants to activate.
-
getInactiveProfiles
- Specified by:
getInactiveProfilesin interfaceMavenExecutionRequest- Returns:
- The list of profiles that the user wants to de-activate.
-
getTransferListener
public org.eclipse.aether.transfer.TransferListener getTransferListener()- Specified by:
getTransferListenerin interfaceMavenExecutionRequest
-
getLoggingLevel
public int getLoggingLevel()- Specified by:
getLoggingLevelin interfaceMavenExecutionRequest
-
isOffline
public boolean isOffline()- Specified by:
isOfflinein interfaceMavenExecutionRequest
-
isUpdateSnapshots
public boolean isUpdateSnapshots()- Specified by:
isUpdateSnapshotsin interfaceMavenExecutionRequest
-
isNoSnapshotUpdates
public boolean isNoSnapshotUpdates()- Specified by:
isNoSnapshotUpdatesin interfaceMavenExecutionRequest
-
getGlobalChecksumPolicy
- Specified by:
getGlobalChecksumPolicyin interfaceMavenExecutionRequest
-
isRecursive
public boolean isRecursive()- Specified by:
isRecursivein interfaceMavenExecutionRequest
-
setBaseDirectory
- Specified by:
setBaseDirectoryin interfaceMavenExecutionRequest
-
setStartTime
- Specified by:
setStartTimein interfaceMavenExecutionRequest
-
setShowErrors
- Specified by:
setShowErrorsin interfaceMavenExecutionRequest
-
setGoals
- Specified by:
setGoalsin interfaceMavenExecutionRequest
-
setLocalRepository
- Specified by:
setLocalRepositoryin interfaceMavenExecutionRequest
-
setLocalRepositoryPath
- Specified by:
setLocalRepositoryPathin interfaceMavenExecutionRequest
-
setLocalRepositoryPath
- Specified by:
setLocalRepositoryPathin interfaceMavenExecutionRequest
-
setSystemProperties
Description copied from interface:MavenExecutionRequestSets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment likeSystem.getProperties()and environment variables.- Specified by:
setSystemPropertiesin interfaceMavenExecutionRequest- Parameters:
properties- The system properties, may benull.- Returns:
- This request, never
null.
-
setUserProperties
Description copied from interface:MavenExecutionRequestSets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the-Dkey=valueparameter on the command line.- Specified by:
setUserPropertiesin interfaceMavenExecutionRequest- Parameters:
userProperties- The user properties, may benull.- Returns:
- This request, never
null.
-
setReactorFailureBehavior
- Specified by:
setReactorFailureBehaviorin interfaceMavenExecutionRequest
-
setSelectedProjects
- Specified by:
setSelectedProjectsin interfaceMavenExecutionRequest
-
setExcludedProjects
- Specified by:
setExcludedProjectsin interfaceMavenExecutionRequest- Parameters:
excludedProjects- the projects to exclude- Returns:
- this MavenExecutionRequest
-
setResume
Description copied from interface:MavenExecutionRequestSets whether the build should be resumed from the data in the resume.properties file.- Specified by:
setResumein interfaceMavenExecutionRequest- Parameters:
resume- Whether or not to resume a previous build.- Returns:
- This request, never
null.
-
setResumeFrom
- Specified by:
setResumeFromin interfaceMavenExecutionRequest
-
setMakeBehavior
- Specified by:
setMakeBehaviorin interfaceMavenExecutionRequest
-
addActiveProfile
- Specified by:
addActiveProfilein interfaceMavenExecutionRequest
-
addInactiveProfile
- Specified by:
addInactiveProfilein interfaceMavenExecutionRequest
-
addActiveProfiles
- Specified by:
addActiveProfilesin interfaceMavenExecutionRequest
-
addInactiveProfiles
- Specified by:
addInactiveProfilesin interfaceMavenExecutionRequest
-
setUseReactor
-
useReactor
public boolean useReactor() -
setPomFile
Deprecated.usesetPom(File) -
setPom
- Specified by:
setPomin interfaceMavenExecutionRequest
-
setInteractiveMode
- Specified by:
setInteractiveModein interfaceMavenExecutionRequest
-
setTransferListener
public MavenExecutionRequest setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener) - Specified by:
setTransferListenerin interfaceMavenExecutionRequest
-
setLoggingLevel
- Specified by:
setLoggingLevelin interfaceMavenExecutionRequest
-
setOffline
- Specified by:
setOfflinein interfaceMavenExecutionRequest
-
setUpdateSnapshots
- Specified by:
setUpdateSnapshotsin interfaceMavenExecutionRequest
-
setNoSnapshotUpdates
- Specified by:
setNoSnapshotUpdatesin interfaceMavenExecutionRequest
-
setGlobalChecksumPolicy
- Specified by:
setGlobalChecksumPolicyin interfaceMavenExecutionRequest
-
getProxies
- Specified by:
getProxiesin interfaceMavenExecutionRequest
-
setProxies
- Specified by:
setProxiesin interfaceMavenExecutionRequest
-
addProxy
- Specified by:
addProxyin interfaceMavenExecutionRequest
-
getServers
- Specified by:
getServersin interfaceMavenExecutionRequest
-
setServers
- Specified by:
setServersin interfaceMavenExecutionRequest
-
addServer
- Specified by:
addServerin interfaceMavenExecutionRequest
-
getMirrors
- Specified by:
getMirrorsin interfaceMavenExecutionRequest
-
setMirrors
- Specified by:
setMirrorsin interfaceMavenExecutionRequest
-
addMirror
- Specified by:
addMirrorin interfaceMavenExecutionRequest
-
getProfiles
- Specified by:
getProfilesin interfaceMavenExecutionRequest
-
setProfiles
- Specified by:
setProfilesin interfaceMavenExecutionRequest
-
getPluginGroups
- Specified by:
getPluginGroupsin interfaceMavenExecutionRequest
-
setPluginGroups
- Specified by:
setPluginGroupsin interfaceMavenExecutionRequest
-
addPluginGroup
- Specified by:
addPluginGroupin interfaceMavenExecutionRequest
-
addPluginGroups
- Specified by:
addPluginGroupsin interfaceMavenExecutionRequest
-
setRecursive
- Specified by:
setRecursivein interfaceMavenExecutionRequest
-
isProjectPresent
public boolean isProjectPresent()- Specified by:
isProjectPresentin interfaceMavenExecutionRequest
-
setProjectPresent
- Specified by:
setProjectPresentin interfaceMavenExecutionRequest
-
getUserSettingsFile
- Specified by:
getUserSettingsFilein interfaceMavenExecutionRequest
-
setUserSettingsFile
- Specified by:
setUserSettingsFilein interfaceMavenExecutionRequest
-
getProjectSettingsFile
- Specified by:
getProjectSettingsFilein interfaceMavenExecutionRequest
-
setProjectSettingsFile
- Specified by:
setProjectSettingsFilein interfaceMavenExecutionRequest
-
getGlobalSettingsFile
- Specified by:
getGlobalSettingsFilein interfaceMavenExecutionRequest
-
setGlobalSettingsFile
- Specified by:
setGlobalSettingsFilein interfaceMavenExecutionRequest
-
getUserToolchainsFile
- Specified by:
getUserToolchainsFilein interfaceMavenExecutionRequest
-
setUserToolchainsFile
- Specified by:
setUserToolchainsFilein interfaceMavenExecutionRequest
-
getGlobalToolchainsFile
- Specified by:
getGlobalToolchainsFilein interfaceMavenExecutionRequest- Returns:
- the global toolchains file
-
setGlobalToolchainsFile
- Specified by:
setGlobalToolchainsFilein interfaceMavenExecutionRequest- Parameters:
globalToolchainsFile- the global toolchains file- Returns:
- this request
-
addRemoteRepository
- Specified by:
addRemoteRepositoryin interfaceMavenExecutionRequest
-
getRemoteRepositories
- Specified by:
getRemoteRepositoriesin interfaceMavenExecutionRequest
-
addPluginArtifactRepository
- Specified by:
addPluginArtifactRepositoryin interfaceMavenExecutionRequest
-
getPluginArtifactRepositories
- Specified by:
getPluginArtifactRepositoriesin interfaceMavenExecutionRequest
-
getProjectBuildingRequest
- Specified by:
getProjectBuildingRequestin interfaceMavenExecutionRequest
-
addProfile
- Specified by:
addProfilein interfaceMavenExecutionRequest
-
getRepositoryCache
public org.eclipse.aether.RepositoryCache getRepositoryCache()- Specified by:
getRepositoryCachein interfaceMavenExecutionRequest
-
setRepositoryCache
- Specified by:
setRepositoryCachein interfaceMavenExecutionRequest
-
getExecutionListener
- Specified by:
getExecutionListenerin interfaceMavenExecutionRequest
-
setExecutionListener
- Specified by:
setExecutionListenerin interfaceMavenExecutionRequest
-
setDegreeOfConcurrency
public void setDegreeOfConcurrency(int degreeOfConcurrency) Description copied from interface:MavenExecutionRequestSet's the parallel degree of concurrency used by the build.- Specified by:
setDegreeOfConcurrencyin interfaceMavenExecutionRequest
-
getDegreeOfConcurrency
public int getDegreeOfConcurrency()- Specified by:
getDegreeOfConcurrencyin interfaceMavenExecutionRequest- Returns:
- the degree of concurrency for the build.
-
getWorkspaceReader
public org.eclipse.aether.repository.WorkspaceReader getWorkspaceReader()- Specified by:
getWorkspaceReaderin interfaceMavenExecutionRequest
-
setWorkspaceReader
public MavenExecutionRequest setWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader workspaceReader) - Specified by:
setWorkspaceReaderin interfaceMavenExecutionRequest
-
isCacheTransferError
public boolean isCacheTransferError()- Specified by:
isCacheTransferErrorin interfaceMavenExecutionRequest
-
setCacheTransferError
- Specified by:
setCacheTransferErrorin interfaceMavenExecutionRequest
-
isCacheNotFound
public boolean isCacheNotFound()- Specified by:
isCacheNotFoundin interfaceMavenExecutionRequest
-
setCacheNotFound
- Specified by:
setCacheNotFoundin interfaceMavenExecutionRequest
-
isIgnoreMissingArtifactDescriptor
public boolean isIgnoreMissingArtifactDescriptor()- Specified by:
isIgnoreMissingArtifactDescriptorin interfaceMavenExecutionRequest
-
setIgnoreMissingArtifactDescriptor
- Specified by:
setIgnoreMissingArtifactDescriptorin interfaceMavenExecutionRequest
-
isIgnoreInvalidArtifactDescriptor
public boolean isIgnoreInvalidArtifactDescriptor()- Specified by:
isIgnoreInvalidArtifactDescriptorin interfaceMavenExecutionRequest
-
setIgnoreInvalidArtifactDescriptor
- Specified by:
setIgnoreInvalidArtifactDescriptorin interfaceMavenExecutionRequest
-
isUseLegacyLocalRepository
public boolean isUseLegacyLocalRepository()- Specified by:
isUseLegacyLocalRepositoryin interfaceMavenExecutionRequest
-
setUseLegacyLocalRepository
- Specified by:
setUseLegacyLocalRepositoryin interfaceMavenExecutionRequest
-
setBuilderId
Description copied from interface:MavenExecutionRequestControls theBuilderused by Maven by specification of the builder's id.- Specified by:
setBuilderIdin interfaceMavenExecutionRequest
-
getBuilderId
Description copied from interface:MavenExecutionRequestControls theBuilderused by Maven by specification of the builders id.- Specified by:
getBuilderIdin interfaceMavenExecutionRequest
-
getToolchains
- Specified by:
getToolchainsin interfaceMavenExecutionRequest- Returns:
- all toolchains grouped by type, never
null
-
setToolchains
- Specified by:
setToolchainsin interfaceMavenExecutionRequest- Parameters:
toolchains- all toolchains grouped by type- Returns:
- this request
-
setMultiModuleProjectDirectory
Deprecated.- Specified by:
setMultiModuleProjectDirectoryin interfaceMavenExecutionRequest
-
getMultiModuleProjectDirectory
Deprecated.- Specified by:
getMultiModuleProjectDirectoryin interfaceMavenExecutionRequest
-
getRootDirectory
Description copied from interface:MavenExecutionRequestGets the root directory of the top project, which is the parent directory containing the.mvndirectory or apom.xmlfile with theroot="true"attribute. If there's no such directory, anIllegalStateExceptionwill be thrown.- Specified by:
getRootDirectoryin interfaceMavenExecutionRequest- See Also:
-
setRootDirectory
Description copied from interface:MavenExecutionRequestSets the root directory of the project.- Specified by:
setRootDirectoryin interfaceMavenExecutionRequest
-
getTopDirectory
Description copied from interface:MavenExecutionRequestGets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.- Specified by:
getTopDirectoryin interfaceMavenExecutionRequest
-
setTopDirectory
Description copied from interface:MavenExecutionRequestSets the top directory of the project.- Specified by:
setTopDirectoryin interfaceMavenExecutionRequest
-
setEventSpyDispatcher
- Specified by:
setEventSpyDispatcherin interfaceMavenExecutionRequest
-
getEventSpyDispatcher
- Specified by:
getEventSpyDispatcherin interfaceMavenExecutionRequest
-
getData
- Specified by:
getDatain interfaceMavenExecutionRequest
-
setPom(File)