Package org.apache.maven.execution
Class DefaultMavenExecutionRequest
- java.lang.Object
-
- org.apache.maven.execution.DefaultMavenExecutionRequest
-
- All Implemented Interfaces:
MavenExecutionRequest
public class DefaultMavenExecutionRequest extends Object implements MavenExecutionRequest
- Author:
- Jason van Zyl
-
-
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 Constructor Description DefaultMavenExecutionRequest()
-
Method Summary
-
-
-
Method Detail
-
copy
public static MavenExecutionRequest copy(MavenExecutionRequest original)
-
getBaseDirectory
public String getBaseDirectory()
- Specified by:
getBaseDirectory
in interfaceMavenExecutionRequest
-
getLocalRepository
public ArtifactRepository getLocalRepository()
- Specified by:
getLocalRepository
in interfaceMavenExecutionRequest
-
getLocalRepositoryPath
public File getLocalRepositoryPath()
- Specified by:
getLocalRepositoryPath
in interfaceMavenExecutionRequest
-
getGoals
public List<String> getGoals()
- Specified by:
getGoals
in interfaceMavenExecutionRequest
-
getSystemProperties
public Properties 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
public Properties 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
public File getPom()
- Specified by:
getPom
in interfaceMavenExecutionRequest
-
getReactorFailureBehavior
public String getReactorFailureBehavior()
- Specified by:
getReactorFailureBehavior
in interfaceMavenExecutionRequest
-
getSelectedProjects
public List<String> getSelectedProjects()
- Specified by:
getSelectedProjects
in interfaceMavenExecutionRequest
-
getExcludedProjects
public List<String> getExcludedProjects()
- Specified by:
getExcludedProjects
in interfaceMavenExecutionRequest
- Returns:
- the excluded projects, never
null
-
getResumeFrom
public String getResumeFrom()
- Specified by:
getResumeFrom
in interfaceMavenExecutionRequest
-
getMakeBehavior
public String getMakeBehavior()
- Specified by:
getMakeBehavior
in interfaceMavenExecutionRequest
-
getStartTime
public Date getStartTime()
- Specified by:
getStartTime
in interfaceMavenExecutionRequest
-
isShowErrors
public boolean isShowErrors()
- Specified by:
isShowErrors
in interfaceMavenExecutionRequest
-
isInteractiveMode
public boolean isInteractiveMode()
- Specified by:
isInteractiveMode
in interfaceMavenExecutionRequest
-
setActiveProfiles
public MavenExecutionRequest setActiveProfiles(List<String> activeProfiles)
- Specified by:
setActiveProfiles
in interfaceMavenExecutionRequest
-
setInactiveProfiles
public MavenExecutionRequest setInactiveProfiles(List<String> inactiveProfiles)
- Specified by:
setInactiveProfiles
in interfaceMavenExecutionRequest
-
setRemoteRepositories
public MavenExecutionRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories)
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
public void setProjectBuildingConfiguration(ProjectBuildingRequest projectBuildingConfiguration)
-
getActiveProfiles
public List<String> getActiveProfiles()
- Specified by:
getActiveProfiles
in interfaceMavenExecutionRequest
-
getInactiveProfiles
public List<String> getInactiveProfiles()
- Specified by:
getInactiveProfiles
in interfaceMavenExecutionRequest
-
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
public String getGlobalChecksumPolicy()
- Specified by:
getGlobalChecksumPolicy
in interfaceMavenExecutionRequest
-
isRecursive
public boolean isRecursive()
- Specified by:
isRecursive
in interfaceMavenExecutionRequest
-
setBaseDirectory
public MavenExecutionRequest setBaseDirectory(File basedir)
- Specified by:
setBaseDirectory
in interfaceMavenExecutionRequest
-
setStartTime
public MavenExecutionRequest setStartTime(Date startTime)
- Specified by:
setStartTime
in interfaceMavenExecutionRequest
-
setShowErrors
public MavenExecutionRequest setShowErrors(boolean showErrors)
- Specified by:
setShowErrors
in interfaceMavenExecutionRequest
-
setGoals
public MavenExecutionRequest setGoals(List<String> goals)
- Specified by:
setGoals
in interfaceMavenExecutionRequest
-
setLocalRepository
public MavenExecutionRequest setLocalRepository(ArtifactRepository localRepository)
- Specified by:
setLocalRepository
in interfaceMavenExecutionRequest
-
setLocalRepositoryPath
public MavenExecutionRequest setLocalRepositoryPath(File localRepository)
- Specified by:
setLocalRepositoryPath
in interfaceMavenExecutionRequest
-
setLocalRepositoryPath
public MavenExecutionRequest setLocalRepositoryPath(String localRepository)
- Specified by:
setLocalRepositoryPath
in interfaceMavenExecutionRequest
-
setSystemProperties
public MavenExecutionRequest setSystemProperties(Properties properties)
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
public MavenExecutionRequest setUserProperties(Properties userProperties)
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
public MavenExecutionRequest setReactorFailureBehavior(String failureBehavior)
- Specified by:
setReactorFailureBehavior
in interfaceMavenExecutionRequest
-
setSelectedProjects
public MavenExecutionRequest setSelectedProjects(List<String> selectedProjects)
- Specified by:
setSelectedProjects
in interfaceMavenExecutionRequest
-
setExcludedProjects
public MavenExecutionRequest setExcludedProjects(List<String> excludedProjects)
- Specified by:
setExcludedProjects
in interfaceMavenExecutionRequest
- Parameters:
excludedProjects
- the projects to exclude- Returns:
- this MavenExecutionRequest
-
setResumeFrom
public MavenExecutionRequest setResumeFrom(String project)
- Specified by:
setResumeFrom
in interfaceMavenExecutionRequest
-
setMakeBehavior
public MavenExecutionRequest setMakeBehavior(String makeBehavior)
- Specified by:
setMakeBehavior
in interfaceMavenExecutionRequest
-
addActiveProfile
public MavenExecutionRequest addActiveProfile(String profile)
- Specified by:
addActiveProfile
in interfaceMavenExecutionRequest
-
addInactiveProfile
public MavenExecutionRequest addInactiveProfile(String profile)
- Specified by:
addInactiveProfile
in interfaceMavenExecutionRequest
-
addActiveProfiles
public MavenExecutionRequest addActiveProfiles(List<String> profiles)
- Specified by:
addActiveProfiles
in interfaceMavenExecutionRequest
-
addInactiveProfiles
public MavenExecutionRequest addInactiveProfiles(List<String> profiles)
- Specified by:
addInactiveProfiles
in interfaceMavenExecutionRequest
-
setUseReactor
public MavenExecutionRequest setUseReactor(boolean reactorActive)
-
useReactor
public boolean useReactor()
-
setPomFile
@Deprecated public MavenExecutionRequest setPomFile(String pomFilename)
Deprecated.usesetPom(File)
-
setPom
public MavenExecutionRequest setPom(File pom)
- Specified by:
setPom
in interfaceMavenExecutionRequest
-
setInteractiveMode
public MavenExecutionRequest setInteractiveMode(boolean interactive)
- Specified by:
setInteractiveMode
in interfaceMavenExecutionRequest
-
setTransferListener
public MavenExecutionRequest setTransferListener(org.eclipse.aether.transfer.TransferListener transferListener)
- Specified by:
setTransferListener
in interfaceMavenExecutionRequest
-
setLoggingLevel
public MavenExecutionRequest setLoggingLevel(int loggingLevel)
- Specified by:
setLoggingLevel
in interfaceMavenExecutionRequest
-
setOffline
public MavenExecutionRequest setOffline(boolean offline)
- Specified by:
setOffline
in interfaceMavenExecutionRequest
-
setUpdateSnapshots
public MavenExecutionRequest setUpdateSnapshots(boolean updateSnapshots)
- Specified by:
setUpdateSnapshots
in interfaceMavenExecutionRequest
-
setNoSnapshotUpdates
public MavenExecutionRequest setNoSnapshotUpdates(boolean noSnapshotUpdates)
- Specified by:
setNoSnapshotUpdates
in interfaceMavenExecutionRequest
-
setGlobalChecksumPolicy
public MavenExecutionRequest setGlobalChecksumPolicy(String globalChecksumPolicy)
- Specified by:
setGlobalChecksumPolicy
in interfaceMavenExecutionRequest
-
getProxies
public List<Proxy> getProxies()
- Specified by:
getProxies
in interfaceMavenExecutionRequest
-
setProxies
public MavenExecutionRequest setProxies(List<Proxy> proxies)
- Specified by:
setProxies
in interfaceMavenExecutionRequest
-
addProxy
public MavenExecutionRequest addProxy(Proxy proxy)
- Specified by:
addProxy
in interfaceMavenExecutionRequest
-
getServers
public List<Server> getServers()
- Specified by:
getServers
in interfaceMavenExecutionRequest
-
setServers
public MavenExecutionRequest setServers(List<Server> servers)
- Specified by:
setServers
in interfaceMavenExecutionRequest
-
addServer
public MavenExecutionRequest addServer(Server server)
- Specified by:
addServer
in interfaceMavenExecutionRequest
-
getMirrors
public List<Mirror> getMirrors()
- Specified by:
getMirrors
in interfaceMavenExecutionRequest
-
setMirrors
public MavenExecutionRequest setMirrors(List<Mirror> mirrors)
- Specified by:
setMirrors
in interfaceMavenExecutionRequest
-
addMirror
public MavenExecutionRequest addMirror(Mirror mirror)
- Specified by:
addMirror
in interfaceMavenExecutionRequest
-
getProfiles
public List<Profile> getProfiles()
- Specified by:
getProfiles
in interfaceMavenExecutionRequest
-
setProfiles
public MavenExecutionRequest setProfiles(List<Profile> profiles)
- Specified by:
setProfiles
in interfaceMavenExecutionRequest
-
getPluginGroups
public List<String> getPluginGroups()
- Specified by:
getPluginGroups
in interfaceMavenExecutionRequest
-
setPluginGroups
public MavenExecutionRequest setPluginGroups(List<String> pluginGroups)
- Specified by:
setPluginGroups
in interfaceMavenExecutionRequest
-
addPluginGroup
public MavenExecutionRequest addPluginGroup(String pluginGroup)
- Specified by:
addPluginGroup
in interfaceMavenExecutionRequest
-
addPluginGroups
public MavenExecutionRequest addPluginGroups(List<String> pluginGroups)
- Specified by:
addPluginGroups
in interfaceMavenExecutionRequest
-
setRecursive
public MavenExecutionRequest setRecursive(boolean recursive)
- Specified by:
setRecursive
in interfaceMavenExecutionRequest
-
isProjectPresent
public boolean isProjectPresent()
- Specified by:
isProjectPresent
in interfaceMavenExecutionRequest
-
setProjectPresent
public MavenExecutionRequest setProjectPresent(boolean projectPresent)
- Specified by:
setProjectPresent
in interfaceMavenExecutionRequest
-
getUserSettingsFile
public File getUserSettingsFile()
- Specified by:
getUserSettingsFile
in interfaceMavenExecutionRequest
-
setUserSettingsFile
public MavenExecutionRequest setUserSettingsFile(File userSettingsFile)
- Specified by:
setUserSettingsFile
in interfaceMavenExecutionRequest
-
getGlobalSettingsFile
public File getGlobalSettingsFile()
- Specified by:
getGlobalSettingsFile
in interfaceMavenExecutionRequest
-
setGlobalSettingsFile
public MavenExecutionRequest setGlobalSettingsFile(File globalSettingsFile)
- Specified by:
setGlobalSettingsFile
in interfaceMavenExecutionRequest
-
getUserToolchainsFile
public File getUserToolchainsFile()
- Specified by:
getUserToolchainsFile
in interfaceMavenExecutionRequest
-
setUserToolchainsFile
public MavenExecutionRequest setUserToolchainsFile(File userToolchainsFile)
- Specified by:
setUserToolchainsFile
in interfaceMavenExecutionRequest
-
getGlobalToolchainsFile
public File getGlobalToolchainsFile()
- Specified by:
getGlobalToolchainsFile
in interfaceMavenExecutionRequest
- Returns:
- the global toolchains file
-
setGlobalToolchainsFile
public MavenExecutionRequest setGlobalToolchainsFile(File globalToolchainsFile)
- Specified by:
setGlobalToolchainsFile
in interfaceMavenExecutionRequest
- Parameters:
globalToolchainsFile
- the global toolchains file- Returns:
- this request
-
addRemoteRepository
public MavenExecutionRequest addRemoteRepository(ArtifactRepository repository)
- Specified by:
addRemoteRepository
in interfaceMavenExecutionRequest
-
getRemoteRepositories
public List<ArtifactRepository> getRemoteRepositories()
- Specified by:
getRemoteRepositories
in interfaceMavenExecutionRequest
-
addPluginArtifactRepository
public MavenExecutionRequest addPluginArtifactRepository(ArtifactRepository repository)
- Specified by:
addPluginArtifactRepository
in interfaceMavenExecutionRequest
-
getPluginArtifactRepositories
public List<ArtifactRepository> getPluginArtifactRepositories()
- Specified by:
getPluginArtifactRepositories
in interfaceMavenExecutionRequest
-
getProjectBuildingRequest
public ProjectBuildingRequest getProjectBuildingRequest()
- Specified by:
getProjectBuildingRequest
in interfaceMavenExecutionRequest
-
addProfile
public MavenExecutionRequest addProfile(Profile profile)
- Specified by:
addProfile
in interfaceMavenExecutionRequest
-
getRepositoryCache
public org.eclipse.aether.RepositoryCache getRepositoryCache()
- Specified by:
getRepositoryCache
in interfaceMavenExecutionRequest
-
setRepositoryCache
public MavenExecutionRequest setRepositoryCache(org.eclipse.aether.RepositoryCache repositoryCache)
- Specified by:
setRepositoryCache
in interfaceMavenExecutionRequest
-
getExecutionListener
public ExecutionListener getExecutionListener()
- Specified by:
getExecutionListener
in interfaceMavenExecutionRequest
-
setExecutionListener
public MavenExecutionRequest setExecutionListener(ExecutionListener executionListener)
- 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
public MavenExecutionRequest setCacheTransferError(boolean cacheTransferError)
- Specified by:
setCacheTransferError
in interfaceMavenExecutionRequest
-
isCacheNotFound
public boolean isCacheNotFound()
- Specified by:
isCacheNotFound
in interfaceMavenExecutionRequest
-
setCacheNotFound
public MavenExecutionRequest setCacheNotFound(boolean cacheNotFound)
- Specified by:
setCacheNotFound
in interfaceMavenExecutionRequest
-
isUseLegacyLocalRepository
public boolean isUseLegacyLocalRepository()
- Specified by:
isUseLegacyLocalRepository
in interfaceMavenExecutionRequest
-
setUseLegacyLocalRepository
public MavenExecutionRequest setUseLegacyLocalRepository(boolean useLegacyLocalRepositoryManager)
- Specified by:
setUseLegacyLocalRepository
in interfaceMavenExecutionRequest
-
setBuilderId
public MavenExecutionRequest setBuilderId(String builderId)
Description copied from interface:MavenExecutionRequest
Controls theBuilder
used by Maven by specification of the builder's id.- Specified by:
setBuilderId
in interfaceMavenExecutionRequest
-
getBuilderId
public String getBuilderId()
Description copied from interface:MavenExecutionRequest
Controls theBuilder
used by Maven by specification of the builders id.- Specified by:
getBuilderId
in interfaceMavenExecutionRequest
-
getToolchains
public Map<String,List<ToolchainModel>> getToolchains()
- Specified by:
getToolchains
in interfaceMavenExecutionRequest
- Returns:
- all toolchains grouped by type, never
null
-
setToolchains
public MavenExecutionRequest setToolchains(Map<String,List<ToolchainModel>> toolchains)
- Specified by:
setToolchains
in interfaceMavenExecutionRequest
- Parameters:
toolchains
- all toolchains grouped by type- Returns:
- this request
-
setMultiModuleProjectDirectory
public void setMultiModuleProjectDirectory(File directory)
- Specified by:
setMultiModuleProjectDirectory
in interfaceMavenExecutionRequest
-
getMultiModuleProjectDirectory
public File getMultiModuleProjectDirectory()
- Specified by:
getMultiModuleProjectDirectory
in interfaceMavenExecutionRequest
-
setEventSpyDispatcher
public MavenExecutionRequest setEventSpyDispatcher(EventSpyDispatcher eventSpyDispatcher)
- Specified by:
setEventSpyDispatcher
in interfaceMavenExecutionRequest
-
getEventSpyDispatcher
public EventSpyDispatcher getEventSpyDispatcher()
- Specified by:
getEventSpyDispatcher
in interfaceMavenExecutionRequest
-
getData
public Map<String,Object> getData()
- Specified by:
getData
in interfaceMavenExecutionRequest
-
-