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
-
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 MavenExecutionRequest
copy
(MavenExecutionRequest original) Controls theBuilder
used by Maven by specification of the builders id.getData()
int
Deprecated.Deprecated.getGoals()
int
Deprecated.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.RepositoryCache
Gets the root directory of the top project, which is the parent directory containing the.mvn
directory or apom.xml
file with theroot="true"
attribute.Deprecated.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/--file
command line argument.org.eclipse.aether.transfer.TransferListener
Gets the user properties to use for interpolation and profile activation.org.eclipse.aether.repository.WorkspaceReader
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isResume()
boolean
boolean
boolean
setActiveProfiles
(List<String> activeProfiles) setBaseDirectory
(File basedir) setBuilderId
(String builderId) Controls theBuilder
used by Maven by specification of the builder's id.setCacheNotFound
(boolean cacheNotFound) setCacheTransferError
(boolean cacheTransferError) void
setDegreeOfConcurrency
(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) Deprecated.setGlobalToolchainsFile
(File installationToolchainsFile) Deprecated.setIgnoreInvalidArtifactDescriptor
(boolean ignoreInvalid) setIgnoreMissingArtifactDescriptor
(boolean ignoreMissing) setIgnoreTransitiveRepositories
(boolean ignoreTransitiveRepositories) setInactiveProfiles
(List<String> inactiveProfiles) setInstallationSettingsFile
(File installationSettingsFile) setInstallationToolchainsFile
(File installationToolchainsFile) setInteractiveMode
(boolean interactive) setLocalRepository
(ArtifactRepository localRepository) setLocalRepositoryPath
(File localRepository) setLocalRepositoryPath
(String localRepository) setLoggingLevel
(int loggingLevel) setMakeBehavior
(String makeBehavior) setMirrors
(List<Mirror> mirrors) void
setMultiModuleProjectDirectory
(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) void
setProjectBuildingConfiguration
(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) setStartInstant
(Instant startTime) setStartTime
(Date startTime) Deprecated.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:
getBaseDirectory
in interfaceMavenExecutionRequest
-
getLocalRepository
- Specified by:
getLocalRepository
in interfaceMavenExecutionRequest
-
getLocalRepositoryPath
- Specified by:
getLocalRepositoryPath
in interfaceMavenExecutionRequest
-
getGoals
- Specified by:
getGoals
in interfaceMavenExecutionRequest
-
getSystemProperties
Description copied from interface:MavenExecutionRequest
Gets 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:
getSystemProperties
in interfaceMavenExecutionRequest
- Returns:
- The system properties, never
null
.
-
getUserProperties
Description copied from interface:MavenExecutionRequest
Gets 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=value
parameter on the command line.- Specified by:
getUserProperties
in interfaceMavenExecutionRequest
- Returns:
- The user properties, never
null
.
-
getPom
- Specified by:
getPom
in interfaceMavenExecutionRequest
-
getReactorFailureBehavior
- Specified by:
getReactorFailureBehavior
in interfaceMavenExecutionRequest
-
getSelectedProjects
- Specified by:
getSelectedProjects
in interfaceMavenExecutionRequest
-
getExcludedProjects
- Specified by:
getExcludedProjects
in interfaceMavenExecutionRequest
- Returns:
- the excluded projects, never
null
-
isResume
public boolean isResume()- Specified by:
isResume
in interfaceMavenExecutionRequest
- Returns:
- Whether the build should be resumed from the data in the resume.properties file.
-
getResumeFrom
- Specified by:
getResumeFrom
in interfaceMavenExecutionRequest
-
getMakeBehavior
- Specified by:
getMakeBehavior
in interfaceMavenExecutionRequest
-
getStartTime
Deprecated.- Specified by:
getStartTime
in interfaceMavenExecutionRequest
-
getStartInstant
- Specified by:
getStartInstant
in interfaceMavenExecutionRequest
-
setStartInstant
- Specified by:
setStartInstant
in interfaceMavenExecutionRequest
-
isShowErrors
public boolean isShowErrors()- Specified by:
isShowErrors
in interfaceMavenExecutionRequest
-
isInteractiveMode
public boolean isInteractiveMode()- Specified by:
isInteractiveMode
in interfaceMavenExecutionRequest
-
setActiveProfiles
- Specified by:
setActiveProfiles
in interfaceMavenExecutionRequest
-
setInactiveProfiles
- Specified by:
setInactiveProfiles
in interfaceMavenExecutionRequest
-
getProjectActivation
Description copied from interface:MavenExecutionRequest
Return the requested activation(s) of project(s) in this execution.- Specified by:
getProjectActivation
in interfaceMavenExecutionRequest
- Returns:
- requested (de-)activation(s) of project(s) in this execution. Never
null
.
-
getProfileActivation
Description copied from interface:MavenExecutionRequest
Return the requested activation(s) of profile(s) in this execution.- Specified by:
getProfileActivation
in interfaceMavenExecutionRequest
- Returns:
- requested (de-)activation(s) of profile(s) in this execution. Never
null
.
-
setRemoteRepositories
Description copied from interface:MavenExecutionRequest
Set 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:
setRemoteRepositories
in interfaceMavenExecutionRequest
- Returns:
- This request, never
null
.
-
setPluginArtifactRepositories
public MavenExecutionRequest setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories) - Specified by:
setPluginArtifactRepositories
in interfaceMavenExecutionRequest
-
setProjectBuildingConfiguration
-
getActiveProfiles
- Specified by:
getActiveProfiles
in interfaceMavenExecutionRequest
- Returns:
- The list of profiles that the user wants to activate.
-
getInactiveProfiles
- Specified by:
getInactiveProfiles
in interfaceMavenExecutionRequest
- Returns:
- The list of profiles that the user wants to de-activate.
-
getTransferListener
public org.eclipse.aether.transfer.TransferListener getTransferListener()- Specified by:
getTransferListener
in interfaceMavenExecutionRequest
-
getLoggingLevel
public int getLoggingLevel()- Specified by:
getLoggingLevel
in interfaceMavenExecutionRequest
-
isOffline
public boolean isOffline()- Specified by:
isOffline
in interfaceMavenExecutionRequest
-
isUpdateSnapshots
public boolean isUpdateSnapshots()- Specified by:
isUpdateSnapshots
in interfaceMavenExecutionRequest
-
isNoSnapshotUpdates
public boolean isNoSnapshotUpdates()- Specified by:
isNoSnapshotUpdates
in interfaceMavenExecutionRequest
-
getGlobalChecksumPolicy
- Specified by:
getGlobalChecksumPolicy
in interfaceMavenExecutionRequest
-
isRecursive
public boolean isRecursive()- Specified by:
isRecursive
in interfaceMavenExecutionRequest
-
setBaseDirectory
- Specified by:
setBaseDirectory
in interfaceMavenExecutionRequest
-
setStartTime
Deprecated.- Specified by:
setStartTime
in interfaceMavenExecutionRequest
-
setShowErrors
- Specified by:
setShowErrors
in interfaceMavenExecutionRequest
-
setGoals
- Specified by:
setGoals
in interfaceMavenExecutionRequest
-
setLocalRepository
- Specified by:
setLocalRepository
in interfaceMavenExecutionRequest
-
setLocalRepositoryPath
- Specified by:
setLocalRepositoryPath
in interfaceMavenExecutionRequest
-
setLocalRepositoryPath
- Specified by:
setLocalRepositoryPath
in interfaceMavenExecutionRequest
-
setSystemProperties
Description copied from interface:MavenExecutionRequest
Sets 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:
setSystemProperties
in interfaceMavenExecutionRequest
- Parameters:
properties
- The system properties, may benull
.- Returns:
- This request, never
null
.
-
setUserProperties
Description copied from interface:MavenExecutionRequest
Sets 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=value
parameter on the command line.- Specified by:
setUserProperties
in interfaceMavenExecutionRequest
- Parameters:
userProperties
- The user properties, may benull
.- Returns:
- This request, never
null
.
-
setReactorFailureBehavior
- Specified by:
setReactorFailureBehavior
in interfaceMavenExecutionRequest
-
setSelectedProjects
- Specified by:
setSelectedProjects
in interfaceMavenExecutionRequest
-
setExcludedProjects
- Specified by:
setExcludedProjects
in interfaceMavenExecutionRequest
- Parameters:
excludedProjects
- the projects to exclude- Returns:
- this MavenExecutionRequest
-
setResume
Description copied from interface:MavenExecutionRequest
Sets whether the build should be resumed from the data in the resume.properties file.- Specified by:
setResume
in interfaceMavenExecutionRequest
- Parameters:
resume
- Whether or not to resume a previous build.- Returns:
- This request, never
null
.
-
setResumeFrom
- Specified by:
setResumeFrom
in interfaceMavenExecutionRequest
-
setMakeBehavior
- Specified by:
setMakeBehavior
in interfaceMavenExecutionRequest
-
addActiveProfile
- Specified by:
addActiveProfile
in interfaceMavenExecutionRequest
-
addInactiveProfile
- Specified by:
addInactiveProfile
in interfaceMavenExecutionRequest
-
addActiveProfiles
- Specified by:
addActiveProfiles
in interfaceMavenExecutionRequest
-
addInactiveProfiles
- Specified by:
addInactiveProfiles
in interfaceMavenExecutionRequest
-
setUseReactor
-
useReactor
public boolean useReactor() -
setPomFile
Deprecated.usesetPom(File)
-
setPom
- Specified by:
setPom
in interfaceMavenExecutionRequest
-
setInteractiveMode
- Specified by:
setInteractiveMode
in interfaceMavenExecutionRequest
-
setTransferListener
public MavenExecutionRequest setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener) - Specified by:
setTransferListener
in interfaceMavenExecutionRequest
-
setLoggingLevel
- Specified by:
setLoggingLevel
in interfaceMavenExecutionRequest
-
setOffline
- Specified by:
setOffline
in interfaceMavenExecutionRequest
-
setUpdateSnapshots
- Specified by:
setUpdateSnapshots
in interfaceMavenExecutionRequest
-
setNoSnapshotUpdates
- Specified by:
setNoSnapshotUpdates
in interfaceMavenExecutionRequest
-
setGlobalChecksumPolicy
- Specified by:
setGlobalChecksumPolicy
in interfaceMavenExecutionRequest
-
getProxies
- Specified by:
getProxies
in interfaceMavenExecutionRequest
-
setProxies
- Specified by:
setProxies
in interfaceMavenExecutionRequest
-
addProxy
- Specified by:
addProxy
in interfaceMavenExecutionRequest
-
getServers
- Specified by:
getServers
in interfaceMavenExecutionRequest
-
setServers
- Specified by:
setServers
in interfaceMavenExecutionRequest
-
addServer
- Specified by:
addServer
in interfaceMavenExecutionRequest
-
getMirrors
- Specified by:
getMirrors
in interfaceMavenExecutionRequest
-
setMirrors
- Specified by:
setMirrors
in interfaceMavenExecutionRequest
-
addMirror
- Specified by:
addMirror
in interfaceMavenExecutionRequest
-
getProfiles
- Specified by:
getProfiles
in interfaceMavenExecutionRequest
-
setProfiles
- Specified by:
setProfiles
in interfaceMavenExecutionRequest
-
getPluginGroups
- Specified by:
getPluginGroups
in interfaceMavenExecutionRequest
-
setPluginGroups
- Specified by:
setPluginGroups
in interfaceMavenExecutionRequest
-
addPluginGroup
- Specified by:
addPluginGroup
in interfaceMavenExecutionRequest
-
addPluginGroups
- Specified by:
addPluginGroups
in interfaceMavenExecutionRequest
-
setRecursive
- Specified by:
setRecursive
in interfaceMavenExecutionRequest
-
isProjectPresent
public boolean isProjectPresent()- Specified by:
isProjectPresent
in interfaceMavenExecutionRequest
-
setProjectPresent
- Specified by:
setProjectPresent
in interfaceMavenExecutionRequest
-
getUserSettingsFile
- Specified by:
getUserSettingsFile
in interfaceMavenExecutionRequest
-
setUserSettingsFile
- Specified by:
setUserSettingsFile
in interfaceMavenExecutionRequest
-
getProjectSettingsFile
- Specified by:
getProjectSettingsFile
in interfaceMavenExecutionRequest
-
setProjectSettingsFile
- Specified by:
setProjectSettingsFile
in interfaceMavenExecutionRequest
-
getGlobalSettingsFile
Deprecated.- Specified by:
getGlobalSettingsFile
in interfaceMavenExecutionRequest
-
setGlobalSettingsFile
Deprecated.- Specified by:
setGlobalSettingsFile
in interfaceMavenExecutionRequest
-
getInstallationSettingsFile
- Specified by:
getInstallationSettingsFile
in interfaceMavenExecutionRequest
-
setInstallationSettingsFile
- Specified by:
setInstallationSettingsFile
in interfaceMavenExecutionRequest
-
getUserToolchainsFile
- Specified by:
getUserToolchainsFile
in interfaceMavenExecutionRequest
-
setUserToolchainsFile
- Specified by:
setUserToolchainsFile
in interfaceMavenExecutionRequest
-
getGlobalToolchainsFile
Deprecated.- Specified by:
getGlobalToolchainsFile
in interfaceMavenExecutionRequest
- Returns:
- the global toolchains file
-
setGlobalToolchainsFile
Deprecated.- Specified by:
setGlobalToolchainsFile
in interfaceMavenExecutionRequest
- Parameters:
installationToolchainsFile
- the global toolchains file- Returns:
- this request
-
getInstallationToolchainsFile
- Specified by:
getInstallationToolchainsFile
in interfaceMavenExecutionRequest
- Returns:
- the installation toolchains file
-
setInstallationToolchainsFile
- Specified by:
setInstallationToolchainsFile
in interfaceMavenExecutionRequest
- Parameters:
installationToolchainsFile
- the installation toolchains file- Returns:
- this request
-
addRemoteRepository
- Specified by:
addRemoteRepository
in interfaceMavenExecutionRequest
-
getRemoteRepositories
- Specified by:
getRemoteRepositories
in interfaceMavenExecutionRequest
-
addPluginArtifactRepository
- Specified by:
addPluginArtifactRepository
in interfaceMavenExecutionRequest
-
getPluginArtifactRepositories
- Specified by:
getPluginArtifactRepositories
in interfaceMavenExecutionRequest
-
getProjectBuildingRequest
- Specified by:
getProjectBuildingRequest
in interfaceMavenExecutionRequest
-
addProfile
- Specified by:
addProfile
in interfaceMavenExecutionRequest
-
getRepositoryCache
public org.eclipse.aether.RepositoryCache getRepositoryCache()- Specified by:
getRepositoryCache
in interfaceMavenExecutionRequest
-
setRepositoryCache
- Specified by:
setRepositoryCache
in interfaceMavenExecutionRequest
-
getExecutionListener
- Specified by:
getExecutionListener
in interfaceMavenExecutionRequest
-
setExecutionListener
- Specified by:
setExecutionListener
in interfaceMavenExecutionRequest
-
setDegreeOfConcurrency
public void setDegreeOfConcurrency(int degreeOfConcurrency) Description copied from interface:MavenExecutionRequest
Set's the parallel degree of concurrency used by the build.- Specified by:
setDegreeOfConcurrency
in interfaceMavenExecutionRequest
-
getDegreeOfConcurrency
public int getDegreeOfConcurrency()- Specified by:
getDegreeOfConcurrency
in interfaceMavenExecutionRequest
- Returns:
- the degree of concurrency for the build.
-
getWorkspaceReader
public org.eclipse.aether.repository.WorkspaceReader getWorkspaceReader()- Specified by:
getWorkspaceReader
in interfaceMavenExecutionRequest
-
setWorkspaceReader
public MavenExecutionRequest setWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader workspaceReader) - Specified by:
setWorkspaceReader
in interfaceMavenExecutionRequest
-
isCacheTransferError
public boolean isCacheTransferError()- Specified by:
isCacheTransferError
in interfaceMavenExecutionRequest
-
setCacheTransferError
- Specified by:
setCacheTransferError
in interfaceMavenExecutionRequest
-
isCacheNotFound
public boolean isCacheNotFound()- Specified by:
isCacheNotFound
in interfaceMavenExecutionRequest
-
setCacheNotFound
- Specified by:
setCacheNotFound
in interfaceMavenExecutionRequest
-
isIgnoreMissingArtifactDescriptor
public boolean isIgnoreMissingArtifactDescriptor()- Specified by:
isIgnoreMissingArtifactDescriptor
in interfaceMavenExecutionRequest
-
setIgnoreMissingArtifactDescriptor
- Specified by:
setIgnoreMissingArtifactDescriptor
in interfaceMavenExecutionRequest
-
isIgnoreInvalidArtifactDescriptor
public boolean isIgnoreInvalidArtifactDescriptor()- Specified by:
isIgnoreInvalidArtifactDescriptor
in interfaceMavenExecutionRequest
-
isIgnoreTransitiveRepositories
public boolean isIgnoreTransitiveRepositories()- Specified by:
isIgnoreTransitiveRepositories
in interfaceMavenExecutionRequest
-
setIgnoreInvalidArtifactDescriptor
- Specified by:
setIgnoreInvalidArtifactDescriptor
in interfaceMavenExecutionRequest
-
setIgnoreTransitiveRepositories
- Specified by:
setIgnoreTransitiveRepositories
in interfaceMavenExecutionRequest
-
isUseLegacyLocalRepository
public boolean isUseLegacyLocalRepository()- Specified by:
isUseLegacyLocalRepository
in interfaceMavenExecutionRequest
-
setUseLegacyLocalRepository
- Specified by:
setUseLegacyLocalRepository
in interfaceMavenExecutionRequest
-
setBuilderId
Description copied from interface:MavenExecutionRequest
Controls theBuilder
used by Maven by specification of the builder's id.- Specified by:
setBuilderId
in interfaceMavenExecutionRequest
-
getBuilderId
Description copied from interface:MavenExecutionRequest
Controls theBuilder
used by Maven by specification of the builders id.- Specified by:
getBuilderId
in interfaceMavenExecutionRequest
-
getToolchains
- Specified by:
getToolchains
in interfaceMavenExecutionRequest
- Returns:
- all toolchains grouped by type, never
null
-
setToolchains
- Specified by:
setToolchains
in interfaceMavenExecutionRequest
- Parameters:
toolchains
- all toolchains grouped by type- Returns:
- this request
-
setMultiModuleProjectDirectory
Deprecated.- Specified by:
setMultiModuleProjectDirectory
in interfaceMavenExecutionRequest
-
getMultiModuleProjectDirectory
Deprecated.- Specified by:
getMultiModuleProjectDirectory
in interfaceMavenExecutionRequest
-
getRootDirectory
Description copied from interface:MavenExecutionRequest
Gets the root directory of the top project, which is the parent directory containing the.mvn
directory or apom.xml
file with theroot="true"
attribute. If there's no such directory, anIllegalStateException
will be thrown.- Specified by:
getRootDirectory
in interfaceMavenExecutionRequest
- See Also:
-
setRootDirectory
Description copied from interface:MavenExecutionRequest
Sets the root directory of the project.- Specified by:
setRootDirectory
in interfaceMavenExecutionRequest
-
getTopDirectory
Description copied from interface:MavenExecutionRequest
Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--file
command line argument.- Specified by:
getTopDirectory
in interfaceMavenExecutionRequest
-
setTopDirectory
Description copied from interface:MavenExecutionRequest
Sets the top directory of the project.- Specified by:
setTopDirectory
in interfaceMavenExecutionRequest
-
setEventSpyDispatcher
- Specified by:
setEventSpyDispatcher
in interfaceMavenExecutionRequest
-
getEventSpyDispatcher
- Specified by:
getEventSpyDispatcher
in interfaceMavenExecutionRequest
-
getData
- Specified by:
getData
in interfaceMavenExecutionRequest
-
setPom(File)