Package org.apache.maven.execution
Interface MavenExecutionRequest
- All Known Implementing Classes:
DefaultMavenExecutionRequest
public interface MavenExecutionRequest
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddActiveProfile
(String profile) Deprecated.addActiveProfiles
(List<String> profiles) Deprecated.Since Maven 4: usegetProfileActivation()
.addInactiveProfile
(String profile) Deprecated.Since Maven 4: usegetProfileActivation()
.addInactiveProfiles
(List<String> profiles) Deprecated.Since Maven 4: usegetProfileActivation()
.addPluginArtifactRepository
(ArtifactRepository repository) addPluginGroup
(String pluginGroup) addPluginGroups
(List<String> pluginGroups) addProfile
(Profile profile) addRemoteRepository
(ArtifactRepository repository) Deprecated.Since Maven 4: usegetProfileActivation()
.Deprecated.usegetTopDirectory()
insteadControls theBuilder
used by Maven by specification of the builders id.getData()
int
Deprecated.Since Maven 4: usegetProjectActivation()
.Deprecated.Deprecated.getGoals()
Deprecated.Since Maven 4: usegetProfileActivation()
.int
Deprecated.usegetRootDirectory()
insteadgetPom()
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.Since Maven 4: usegetProjectActivation()
.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
Deprecated.Since 3.9 there is no direct Maven2 interop offered at LRM level.setActiveProfiles
(List<String> profiles) Deprecated.Since Maven 4: usegetProfileActivation()
.setBaseDirectory
(File basedir) Deprecated.usesetTopDirectory(Path)
insteadsetBuilderId
(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> projects) Deprecated.Since Maven 4: usegetProjectActivation()
.setExecutionListener
(ExecutionListener executionListener) setGlobalChecksumPolicy
(String globalChecksumPolicy) setGlobalSettingsFile
(File globalSettingsFile) Deprecated.setGlobalToolchainsFile
(File globalToolchainsFile) Deprecated.setIgnoreInvalidArtifactDescriptor
(boolean ignoreInvalid) setIgnoreMissingArtifactDescriptor
(boolean ignoreMissing) setIgnoreTransitiveRepositories
(boolean ignoreTransitiveRepositories) setInactiveProfiles
(List<String> profiles) Deprecated.Since Maven 4: usegetProfileActivation()
.setInstallationSettingsFile
(File installationSettingsFile) setInstallationToolchainsFile
(File installationToolchainsFile) setInteractiveMode
(boolean interactive) setLocalRepository
(ArtifactRepository repository) setLocalRepositoryPath
(File localRepository) setLocalRepositoryPath
(String localRepository) setLoggingLevel
(int loggingLevel) setMakeBehavior
(String makeBehavior) setMirrors
(List<Mirror> mirrors) void
Deprecated.usesetRootDirectory(Path)
insteadsetNoSnapshotUpdates
(boolean noSnapshotUpdates) setOffline
(boolean offline) setPluginArtifactRepositories
(List<ArtifactRepository> repositories) setPluginGroups
(List<String> pluginGroups) setProfiles
(List<Profile> profiles) setProjectPresent
(boolean isProjectPresent) setProjectSettingsFile
(File projectSettingsFile) setProxies
(List<Proxy> proxies) setReactorFailureBehavior
(String failureBehavior) setRecursive
(boolean recursive) setRemoteRepositories
(List<ArtifactRepository> repositories) 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> projects) Deprecated.Since Maven 4: usegetProjectActivation()
.setServers
(List<Server> servers) setShowErrors
(boolean showErrors) setStartInstant
(Instant start) setStartTime
(Date start) Deprecated.setSystemProperties
(Properties systemProperties) 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 useLegacyLocalRepository) Deprecated.Since 3.9 there is no direct Maven2 interop offered at LRM level.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)
-
Field Details
-
LOGGING_LEVEL_DEBUG
static final int LOGGING_LEVEL_DEBUG- See Also:
-
LOGGING_LEVEL_INFO
static final int LOGGING_LEVEL_INFO- See Also:
-
LOGGING_LEVEL_WARN
static final int LOGGING_LEVEL_WARN- See Also:
-
LOGGING_LEVEL_ERROR
static final int LOGGING_LEVEL_ERROR- See Also:
-
LOGGING_LEVEL_FATAL
static final int LOGGING_LEVEL_FATAL- See Also:
-
LOGGING_LEVEL_DISABLED
static final int LOGGING_LEVEL_DISABLED- See Also:
-
REACTOR_FAIL_FAST
- See Also:
-
REACTOR_FAIL_AT_END
- See Also:
-
REACTOR_FAIL_NEVER
- See Also:
-
REACTOR_MAKE_UPSTREAM
- See Also:
-
REACTOR_MAKE_DOWNSTREAM
- See Also:
-
REACTOR_MAKE_BOTH
- See Also:
-
CHECKSUM_POLICY_FAIL
- See Also:
-
CHECKSUM_POLICY_WARN
- See Also:
-
-
Method Details
-
setBaseDirectory
Deprecated.usesetTopDirectory(Path)
instead -
getBaseDirectory
Deprecated.usegetTopDirectory()
instead -
setStartTime
Deprecated. -
getStartTime
Deprecated. -
setStartInstant
-
getStartInstant
Instant getStartInstant() -
setGoals
-
getGoals
-
setSystemProperties
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.- Parameters:
systemProperties
- The system properties, may benull
.- Returns:
- This request, never
null
.
-
getSystemProperties
Properties getSystemProperties()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.- Returns:
- The system properties, never
null
.
-
setUserProperties
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.- Parameters:
userProperties
- The user properties, may benull
.- Returns:
- This request, never
null
.
-
getUserProperties
Properties getUserProperties()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.- Returns:
- The user properties, never
null
.
-
setReactorFailureBehavior
-
getReactorFailureBehavior
String getReactorFailureBehavior() -
setSelectedProjects
Deprecated.Since Maven 4: usegetProjectActivation()
. -
getSelectedProjects
Deprecated.Since Maven 4: usegetProjectActivation()
. -
setExcludedProjects
Deprecated.Since Maven 4: usegetProjectActivation()
.- Parameters:
projects
- the projects to exclude- Returns:
- this MavenExecutionRequest
- Since:
- 3.2
-
getExcludedProjects
Deprecated.Since Maven 4: usegetProjectActivation()
.- Returns:
- the excluded projects, never
null
- Since:
- 3.2
-
setResume
Sets whether the build should be resumed from the data in the resume.properties file.- Parameters:
resume
- Whether or not to resume a previous build.- Returns:
- This request, never
null
.
-
isResume
boolean isResume()- Returns:
- Whether the build should be resumed from the data in the resume.properties file.
-
setResumeFrom
-
getResumeFrom
String getResumeFrom() -
setMakeBehavior
-
getMakeBehavior
String getMakeBehavior() -
setDegreeOfConcurrency
void setDegreeOfConcurrency(int degreeOfConcurrency) Set's the parallel degree of concurrency used by the build.- Parameters:
degreeOfConcurrency
-
-
getDegreeOfConcurrency
int getDegreeOfConcurrency()- Returns:
- the degree of concurrency for the build.
-
setRecursive
-
isRecursive
boolean isRecursive() -
setPom
-
getPom
File getPom() -
setShowErrors
-
isShowErrors
boolean isShowErrors() -
setTransferListener
MavenExecutionRequest setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener) -
getTransferListener
org.eclipse.aether.transfer.TransferListener getTransferListener() -
setLoggingLevel
-
getLoggingLevel
int getLoggingLevel() -
setUpdateSnapshots
-
isUpdateSnapshots
boolean isUpdateSnapshots() -
setNoSnapshotUpdates
-
isNoSnapshotUpdates
boolean isNoSnapshotUpdates() -
setGlobalChecksumPolicy
-
getGlobalChecksumPolicy
String getGlobalChecksumPolicy() -
setLocalRepositoryPath
-
setLocalRepositoryPath
-
getLocalRepositoryPath
File getLocalRepositoryPath() -
setLocalRepository
-
getLocalRepository
ArtifactRepository getLocalRepository() -
setInteractiveMode
-
isInteractiveMode
boolean isInteractiveMode() -
setOffline
-
isOffline
boolean isOffline() -
isCacheTransferError
boolean isCacheTransferError() -
setCacheTransferError
-
isCacheNotFound
boolean isCacheNotFound() -
setCacheNotFound
-
isIgnoreMissingArtifactDescriptor
boolean isIgnoreMissingArtifactDescriptor()- Since:
- 4.0.0
-
setIgnoreMissingArtifactDescriptor
- Since:
- 4.0.0
-
isIgnoreInvalidArtifactDescriptor
boolean isIgnoreInvalidArtifactDescriptor()- Since:
- 4.0.0
-
setIgnoreInvalidArtifactDescriptor
- Since:
- 4.0.0
-
isIgnoreTransitiveRepositories
boolean isIgnoreTransitiveRepositories()- Since:
- 4.0.0
-
setIgnoreTransitiveRepositories
- Since:
- 4.0.0
-
getProfiles
-
addProfile
-
setProfiles
-
addActiveProfile
Deprecated.Since Maven 4: usegetProfileActivation()
. -
addActiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
. -
setActiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
. -
getActiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
.- Returns:
- The list of profiles that the user wants to activate.
-
addInactiveProfile
Deprecated.Since Maven 4: usegetProfileActivation()
. -
addInactiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
. -
setInactiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
. -
getInactiveProfiles
Deprecated.Since Maven 4: usegetProfileActivation()
.- Returns:
- The list of profiles that the user wants to de-activate.
-
getProjectActivation
ProjectActivation getProjectActivation()Return the requested activation(s) of project(s) in this execution.- Returns:
- requested (de-)activation(s) of project(s) in this execution. Never
null
.
-
getProfileActivation
ProfileActivation getProfileActivation()Return the requested activation(s) of profile(s) in this execution.- Returns:
- requested (de-)activation(s) of profile(s) in this execution. Never
null
.
-
getProxies
-
setProxies
-
addProxy
-
getServers
-
setServers
-
addServer
-
getMirrors
-
setMirrors
-
addMirror
-
getPluginGroups
-
setPluginGroups
-
addPluginGroup
-
addPluginGroups
-
isProjectPresent
boolean isProjectPresent() -
setProjectPresent
-
getUserSettingsFile
File getUserSettingsFile() -
setUserSettingsFile
-
getProjectSettingsFile
File getProjectSettingsFile() -
setProjectSettingsFile
-
getGlobalSettingsFile
Deprecated. -
setGlobalSettingsFile
Deprecated. -
getInstallationSettingsFile
File getInstallationSettingsFile() -
setInstallationSettingsFile
-
addRemoteRepository
-
addPluginArtifactRepository
-
setRemoteRepositories
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.- Parameters:
repositories
-- Returns:
- This request, never
null
.
-
getRemoteRepositories
List<ArtifactRepository> getRemoteRepositories() -
setPluginArtifactRepositories
-
getPluginArtifactRepositories
List<ArtifactRepository> getPluginArtifactRepositories() -
setRepositoryCache
-
getRepositoryCache
org.eclipse.aether.RepositoryCache getRepositoryCache() -
getWorkspaceReader
org.eclipse.aether.repository.WorkspaceReader getWorkspaceReader() -
setWorkspaceReader
MavenExecutionRequest setWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader workspaceReader) -
getUserToolchainsFile
File getUserToolchainsFile() -
setUserToolchainsFile
-
getGlobalToolchainsFile
Deprecated.- Returns:
- the global toolchains file
- Since:
- 3.3.0
-
setGlobalToolchainsFile
Deprecated.- Parameters:
globalToolchainsFile
- the global toolchains file- Returns:
- this request
- Since:
- 3.3.0
-
getInstallationToolchainsFile
File getInstallationToolchainsFile()- Returns:
- the installation toolchains file
- Since:
- 4.0.0
-
setInstallationToolchainsFile
- Parameters:
installationToolchainsFile
- the installation toolchains file- Returns:
- this request
- Since:
- 4.0.0
-
getExecutionListener
ExecutionListener getExecutionListener() -
setExecutionListener
-
getProjectBuildingRequest
ProjectBuildingRequest getProjectBuildingRequest() -
isUseLegacyLocalRepository
Deprecated.Since 3.9 there is no direct Maven2 interop offered at LRM level. See Resolver Configuration page optionaether.artifactResolver.simpleLrmInterop
that provides similar semantics. This method should be never invoked, and always returnsfalse
.- Since:
- 3.1
-
setUseLegacyLocalRepository
Deprecated.Since 3.9 there is no direct Maven2 interop offered at LRM level. See Resolver Configuration page optionaether.artifactResolver.simpleLrmInterop
that provides similar semantics. This method should be never invoked, and ignores parameter (value remains alwaysfalse
).- Since:
- 3.1
-
setBuilderId
Controls theBuilder
used by Maven by specification of the builder's id.- Since:
- 3.2.0
-
getBuilderId
String getBuilderId()Controls theBuilder
used by Maven by specification of the builders id.- Since:
- 3.2.0
-
setToolchains
- Parameters:
toolchains
- all toolchains grouped by type- Returns:
- this request
- Since:
- 3.3.0
-
getToolchains
Map<String,List<ToolchainModel>> getToolchains()- Returns:
- all toolchains grouped by type, never
null
- Since:
- 3.3.0
-
setMultiModuleProjectDirectory
Deprecated.usesetRootDirectory(Path)
instead- Since:
- 3.3.0
-
getMultiModuleProjectDirectory
Deprecated.usegetRootDirectory()
instead- Since:
- 3.3.0
-
setTopDirectory
Sets the top directory of the project.- Since:
- 4.0.0
-
getTopDirectory
Path getTopDirectory()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.- Since:
- 4.0.0
-
setRootDirectory
Sets the root directory of the project.- Since:
- 4.0.0
-
getRootDirectory
Path getRootDirectory()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.- Throws:
IllegalStateException
- if the root directory could not be found- Since:
- 4.0.0
- See Also:
-
setEventSpyDispatcher
- Since:
- 3.3.0
-
getEventSpyDispatcher
EventSpyDispatcher getEventSpyDispatcher()- Since:
- 3.3.0
-
getData
- Since:
- 3.3.0
-
getProfileActivation()
.