Package org.apache.maven.shared.invoker
Class DefaultInvocationRequest
- java.lang.Object
-
- org.apache.maven.shared.invoker.DefaultInvocationRequest
-
- All Implemented Interfaces:
InvocationRequest
public class DefaultInvocationRequest extends Object implements InvocationRequest
Specifies the parameters used to control a Maven invocation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.maven.shared.invoker.InvocationRequest
InvocationRequest.CheckSumPolicy, InvocationRequest.ReactorFailureBehavior
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.shared.invoker.InvocationRequest
NO_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description DefaultInvocationRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocationRequestaddShellEnvironment(String name, String value)Adds the specified environment variable to the Maven invocation.FilegetBaseDirectory()getBaseDirectory.FilegetBaseDirectory(File defaultDirectory)Gets the path to the base directory of the POM for the Maven invocation.StringgetBuilder()Get the current set builder strategy id equivalent of--builder id.InvocationOutputHandlergetErrorHandler(InvocationOutputHandler defaultHandler)Gets the handler used to capture the error output from the Maven build.InvocationRequest.CheckSumPolicygetGlobalChecksumPolicy()Gets the checksum mode of the Maven invocation.FilegetGlobalSettingsFile()Gets the path to the global settings for the Maven invocation.FilegetGlobalToolchainsFile()Alternate path for the global toolchains file Note.List<String>getGoals()Getter for the fieldgoals.InputStreamgetInputStream(InputStream defaultStream)Gets the input stream used to provide input for the invoked Maven build.FilegetJavaHome()Getter for the fieldjavaHome.FilegetLocalRepositoryDirectory(File defaultDirectory)Gets the path to the base directory of the local repository to use for the Maven invocation.StringgetMavenOpts()Getter for the fieldmavenOpts.InvocationOutputHandlergetOutputHandler(InvocationOutputHandler defaultHandler)Gets the handler used to capture the standard output from the Maven build.FilegetPomFile()Getter for the fieldpomFile.StringgetPomFileName()Gets the (unqualified) filename of the POM for the Maven invocation.List<String>getProfiles()Gets the profiles for the Maven invocation.List<String>getProjects()A list of specified reactor projects to build instead of all projects.PropertiesgetProperties()Getter for the fieldproperties.InvocationRequest.ReactorFailureBehaviorgetReactorFailureBehavior()getReactorFailureBehavior.StringgetResumeFrom()Get the value ofresume-fromMap<String,String>getShellEnvironments()Getter for the fieldshellEnvironments.StringgetThreads()Get the value of thethreadsargument.intgetTimeoutInSeconds()getTimeoutInSeconds.FilegetToolchainsFile()Gets the path to the custom toolchains fileFilegetUserSettingsFile()Gets the path to the user settings for the Maven invocation.booleanisAlsoMake()Get the value of thealso-makeargument.booleanisAlsoMakeDependents()Get the value of thealso-make-dependentsbooleanisBatchMode()isBatchMode.booleanisDebug()isDebug.booleanisNonPluginUpdates()Indicates whether Maven should check for plugin updates.booleanisOffline()isOffline.booleanisQuiet()Gets the quiet mode of the Maven invocation.booleanisRecursive()isRecursive.booleanisShellEnvironmentInherited()isShellEnvironmentInherited.booleanisShowErrors()isShowErrors.booleanisShowVersion()isShowVersion.booleanisUpdateSnapshots()isUpdateSnapshots.InvocationRequestsetAlsoMake(boolean alsoMake)Enable the 'also make' mode.InvocationRequestsetAlsoMakeDependents(boolean alsoMakeDependents)Enable the 'also make dependents' mode.InvocationRequestsetBaseDirectory(File basedir)Sets the path to the base directory of the POM for the Maven invocation.InvocationRequestsetBatchMode(boolean interactive)Sets the interaction mode of the Maven invocation.InvocationRequestsetBuilder(String id)The id of the build strategy to use.InvocationRequestsetDebug(boolean debug)Sets the debug mode of the Maven invocation.InvocationRequestsetErrorHandler(InvocationOutputHandler errorHandler)Sets the handler used to capture the error output from the Maven build.InvocationRequestsetGlobalChecksumPolicy(InvocationRequest.CheckSumPolicy globalChecksumPolicy)Sets the checksum mode of the Maven invocation.InvocationRequestsetGlobalSettingsFile(File globalSettings)Sets the path to the global settings for the Maven invocation.InvocationRequestsetGlobalToolchainsFile(File toolchains)Sets the alternate path for the global toolchains file Equivalent of-gtor--global-toolchainsInvocationRequestsetGoals(List<String> goals)Sets the goals for the Maven invocation.InvocationRequestsetInputStream(InputStream inputStream)Sets the input stream used to provide input for the invoked Maven build.InvocationRequestsetJavaHome(File javaHome)Sets the path to the base directory of the Java installation used to run Maven.InvocationRequestsetLocalRepositoryDirectory(File localRepository)Sets the path to the base directory of the local repository to use for the Maven invocation.InvocationRequestsetMavenOpts(String mavenOpts)Sets the value of theMAVEN_OPTSenvironment variable.InvocationRequestsetNonPluginUpdates(boolean nonPluginUpdates)Specifies whether Maven should check for plugin updates.InvocationRequestsetOffline(boolean offline)Sets the network mode of the Maven invocation.InvocationRequestsetOutputHandler(InvocationOutputHandler outputHandler)Sets the handler used to capture the standard output from the Maven build.InvocationRequestsetPomFile(File pomFile)Sets the path to the POM for the Maven invocation.InvocationRequestsetPomFileName(String pomFilename)Sets the (unqualified) filename of the POM for the Maven invocation.InvocationRequestsetProfiles(List<String> profiles)Sets the profiles for the Maven invocation.InvocationRequestsetProjects(List<String> projects)Sets the reactor project list.InvocationRequestsetProperties(Properties properties)Sets the system properties for the Maven invocation.InvocationRequestsetQuiet(boolean quiet)Sets the quiet mode of the Maven invocation.InvocationRequestsetReactorFailureBehavior(InvocationRequest.ReactorFailureBehavior failureBehavior)setReactorFailureBehavior.InvocationRequestsetRecursive(boolean recursive)Sets the recursion behavior of a reactor invocation.InvocationRequestsetResumeFrom(String resumeFrom)Resume reactor from specified project.InvocationRequestsetShellEnvironmentInherited(boolean shellEnvironmentInherited)Specifies whether the environment variables of the current process should be propagated to the Maven invocation.InvocationRequestsetShowErrors(boolean showErrors)Sets the exception output mode of the Maven invocation.InvocationRequestsetShowVersion(boolean showVersion)enable displaying version without stopping the build Equivalent of-Vor--show-versionInvocationRequestsetThreads(String threads)Thread count, for instance 2.0C where C is core multiplied Equivalent of-Tor--threadsvoidsetTimeoutInSeconds(int timeoutInSeconds)setTimeoutInSeconds.InvocationRequestsetToolchainsFile(File toolchains)Sets the alternate path for the user toolchains file Equivalent of-tor--toolchainsInvocationRequestsetUpdateSnapshots(boolean updateSnapshots)Specifies whether Maven should enforce an update check for plugins and snapshots.InvocationRequestsetUserSettingsFile(File userSettings)Sets the path to the user settings for the Maven invocation.
-
-
-
Method Detail
-
getBaseDirectory
public File getBaseDirectory()
getBaseDirectory.
- Specified by:
getBaseDirectoryin interfaceInvocationRequest- Returns:
- a
Fileobject.
-
getBaseDirectory
public File getBaseDirectory(File defaultDirectory)
Gets the path to the base directory of the POM for the Maven invocation. IfInvocationRequest.getPomFile()does not returnnull, this setting only affects the working directory for the Maven invocation.- Specified by:
getBaseDirectoryin interfaceInvocationRequest- Parameters:
defaultDirectory- The default base directory to use if none is configured for this request, may benull.- Returns:
- The path to the base directory of the POM or
nullif not set.
-
getErrorHandler
public InvocationOutputHandler getErrorHandler(InvocationOutputHandler defaultHandler)
Gets the handler used to capture the error output from the Maven build.- Specified by:
getErrorHandlerin interfaceInvocationRequest- Parameters:
defaultHandler- the defaultInvocationOutputHandlerto use- Returns:
- The error handler or
nullif not set.
-
getReactorFailureBehavior
public InvocationRequest.ReactorFailureBehavior getReactorFailureBehavior()
getReactorFailureBehavior.
- Specified by:
getReactorFailureBehaviorin interfaceInvocationRequest- Returns:
- a ReactorFailureBehavior object.
-
getGoals
public List<String> getGoals()
Getter for the field
goals.- Specified by:
getGoalsin interfaceInvocationRequest- Returns:
- a
Listobject.
-
getInputStream
public InputStream getInputStream(InputStream defaultStream)
Gets the input stream used to provide input for the invoked Maven build. This is in particular useful when invoking Maven in interactive mode.- Specified by:
getInputStreamin interfaceInvocationRequest- Parameters:
defaultStream- the defaultInputStreamto use- Returns:
- The input stream used to provide input for the invoked Maven build or
nullif not set.
-
getLocalRepositoryDirectory
public File getLocalRepositoryDirectory(File defaultDirectory)
Gets the path to the base directory of the local repository to use for the Maven invocation.- Specified by:
getLocalRepositoryDirectoryin interfaceInvocationRequest- Parameters:
defaultDirectory- The default location to use if no location is configured for this request, may benull.- Returns:
- The path to the base directory of the local repository or
nullto use the location from thesettings.xml.
-
getOutputHandler
public InvocationOutputHandler getOutputHandler(InvocationOutputHandler defaultHandler)
Gets the handler used to capture the standard output from the Maven build.- Specified by:
getOutputHandlerin interfaceInvocationRequest- Parameters:
defaultHandler- the defaultInvocationOutputHandlerto use- Returns:
- The output handler or
nullif not set.
-
getPomFile
public File getPomFile()
Getter for the field
pomFile.- Specified by:
getPomFilein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
getProperties
public Properties getProperties()
Getter for the field
properties.- Specified by:
getPropertiesin interfaceInvocationRequest- Returns:
- a
Propertiesobject.
-
isDebug
public boolean isDebug()
isDebug.
- Specified by:
isDebugin interfaceInvocationRequest- Returns:
- a boolean.
-
isBatchMode
public boolean isBatchMode()
isBatchMode.
- Specified by:
isBatchModein interfaceInvocationRequest- Returns:
- a boolean.
-
isOffline
public boolean isOffline()
isOffline.
- Specified by:
isOfflinein interfaceInvocationRequest- Returns:
- a boolean.
-
isShowErrors
public boolean isShowErrors()
isShowErrors.
- Specified by:
isShowErrorsin interfaceInvocationRequest- Returns:
- a boolean.
-
isUpdateSnapshots
public boolean isUpdateSnapshots()
isUpdateSnapshots.
- Specified by:
isUpdateSnapshotsin interfaceInvocationRequest- Returns:
- a boolean.
-
isRecursive
public boolean isRecursive()
isRecursive.
- Specified by:
isRecursivein interfaceInvocationRequest- Returns:
- a boolean.
-
setRecursive
public InvocationRequest setRecursive(boolean recursive)
Sets the recursion behavior of a reactor invocation. Inverse equivalent of-Nand--non-recursive- Specified by:
setRecursivein interfaceInvocationRequest- Parameters:
recursive-trueif sub modules should be build,falseotherwise.- Returns:
- This invocation request.
-
setBaseDirectory
public InvocationRequest setBaseDirectory(File basedir)
Sets the path to the base directory of the POM for the Maven invocation. IfInvocationRequest.getPomFile()does not returnnull, this setting only affects the working directory for the Maven invocation.- Specified by:
setBaseDirectoryin interfaceInvocationRequest- Parameters:
basedir- The path to the base directory of the POM, may benullif not used.- Returns:
- This invocation request.
-
setDebug
public InvocationRequest setDebug(boolean debug)
Sets the debug mode of the Maven invocation. Equivalent of-Xand--debug- Specified by:
setDebugin interfaceInvocationRequest- Parameters:
debug-trueif Maven should be executed in debug mode,falseif the normal mode should be used.- Returns:
- This invocation request.
-
setErrorHandler
public InvocationRequest setErrorHandler(InvocationOutputHandler errorHandler)
Sets the handler used to capture the error output from the Maven build.- Specified by:
setErrorHandlerin interfaceInvocationRequest- Parameters:
errorHandler- The error handler, may benullif the output is not of interest.- Returns:
- This invocation request.
-
setReactorFailureBehavior
public InvocationRequest setReactorFailureBehavior(InvocationRequest.ReactorFailureBehavior failureBehavior)
setReactorFailureBehavior.
- Specified by:
setReactorFailureBehaviorin interfaceInvocationRequest- Parameters:
failureBehavior- a ReactorFailureBehavior object.- Returns:
- a
InvocationRequestobject.
-
setGoals
public InvocationRequest setGoals(List<String> goals)
Sets the goals for the Maven invocation.- Specified by:
setGoalsin interfaceInvocationRequest- Parameters:
goals- The goals for the Maven invocation, may benullto execute the POMs default goal.- Returns:
- This invocation request.
-
setInputStream
public InvocationRequest setInputStream(InputStream inputStream)
Sets the input stream used to provide input for the invoked Maven build. This is in particular useful when invoking Maven in interactive mode.- Specified by:
setInputStreamin interfaceInvocationRequest- Parameters:
inputStream- The input stream used to provide input for the invoked Maven build, may benullif not required.- Returns:
- This invocation request.
-
setBatchMode
public InvocationRequest setBatchMode(boolean interactive)
Sets the interaction mode of the Maven invocation. Equivalent of-Band--batch-mode- Specified by:
setBatchModein interfaceInvocationRequest- Parameters:
interactive-trueif Maven should be executed in non-interactive mode,falseif the interactive modes is used.- Returns:
- This invocation request.
-
setLocalRepositoryDirectory
public InvocationRequest setLocalRepositoryDirectory(File localRepository)
Sets the path to the base directory of the local repository to use for the Maven invocation.- Specified by:
setLocalRepositoryDirectoryin interfaceInvocationRequest- Parameters:
localRepository- The path to the base directory of the local repository, may benull.- Returns:
- This invocation request.
-
setOffline
public InvocationRequest setOffline(boolean offline)
Sets the network mode of the Maven invocation. Equivalent of-oand--offline- Specified by:
setOfflinein interfaceInvocationRequest- Parameters:
offline-trueif Maven should be executed in offline mode,falseif the online mode is used.- Returns:
- This invocation request.
-
setOutputHandler
public InvocationRequest setOutputHandler(InvocationOutputHandler outputHandler)
Sets the handler used to capture the standard output from the Maven build.- Specified by:
setOutputHandlerin interfaceInvocationRequest- Parameters:
outputHandler- The output handler, may benullif the output is not of interest.- Returns:
- This invocation request.
-
setPomFile
public InvocationRequest setPomFile(File pomFile)
Sets the path to the POM for the Maven invocation. If no base directory is set, the parent directory of this POM will be used as the working directory for the Maven invocation.- Specified by:
setPomFilein interfaceInvocationRequest- Parameters:
pomFile- The path to the POM for the Maven invocation, may benullif not used.- Returns:
- This invocation request.
-
setProperties
public InvocationRequest setProperties(Properties properties)
Sets the system properties for the Maven invocation.- Specified by:
setPropertiesin interfaceInvocationRequest- Parameters:
properties- The system properties for the Maven invocation, may benullif not set.- Returns:
- This invocation request.
-
setShowErrors
public InvocationRequest setShowErrors(boolean showErrors)
Sets the exception output mode of the Maven invocation. Equivalent of-eand--errors- Specified by:
setShowErrorsin interfaceInvocationRequest- Parameters:
showErrors-trueif Maven should print stack traces,falseotherwise.- Returns:
- This invocation request.
-
setUpdateSnapshots
public InvocationRequest setUpdateSnapshots(boolean updateSnapshots)
Specifies whether Maven should enforce an update check for plugins and snapshots. Equivalent of-Uand--update-snapshots- Specified by:
setUpdateSnapshotsin interfaceInvocationRequest- Parameters:
updateSnapshots-trueif plugins and snapshots should be updated,falseotherwise.- Returns:
- This invocation request.
-
isShellEnvironmentInherited
public boolean isShellEnvironmentInherited()
isShellEnvironmentInherited.
- Specified by:
isShellEnvironmentInheritedin interfaceInvocationRequest- Returns:
- a boolean.
- See Also:
MavenCommandLineBuilder.setShellEnvironment(InvocationRequest, Commandline)
-
setShellEnvironmentInherited
public InvocationRequest setShellEnvironmentInherited(boolean shellEnvironmentInherited)
Specifies whether the environment variables of the current process should be propagated to the Maven invocation.- Specified by:
setShellEnvironmentInheritedin interfaceInvocationRequest- Parameters:
shellEnvironmentInherited-trueif the environment variables should be propagated,falseotherwise.- Returns:
- This invocation request.
-
getJavaHome
public File getJavaHome()
Getter for the field
javaHome.- Specified by:
getJavaHomein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
setJavaHome
public InvocationRequest setJavaHome(File javaHome)
Sets the path to the base directory of the Java installation used to run Maven.- Specified by:
setJavaHomein interfaceInvocationRequest- Parameters:
javaHome- The path to the base directory of the Java installation used to run Maven, may benullto use the default Java home.- Returns:
- This invocation request.
-
getUserSettingsFile
public File getUserSettingsFile()
Gets the path to the user settings for the Maven invocation.- Specified by:
getUserSettingsFilein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
setUserSettingsFile
public InvocationRequest setUserSettingsFile(File userSettings)
Sets the path to the user settings for the Maven invocation. Equivalent of-sand--settings- Specified by:
setUserSettingsFilein interfaceInvocationRequest- Parameters:
userSettings- The path to the user settings for the Maven invocation, may benullto load the user settings from the default location.- Returns:
- This invocation request.
-
getGlobalSettingsFile
public File getGlobalSettingsFile()
Gets the path to the global settings for the Maven invocation.- Specified by:
getGlobalSettingsFilein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
setGlobalSettingsFile
public InvocationRequest setGlobalSettingsFile(File globalSettings)
Sets the path to the global settings for the Maven invocation. Equivalent of-gsand--global-settings- Specified by:
setGlobalSettingsFilein interfaceInvocationRequest- Parameters:
globalSettings- The path to the global settings for the Maven invocation, may benullto load the global settings from the default location.- Returns:
- This invocation request.
-
getToolchainsFile
public File getToolchainsFile()
Gets the path to the custom toolchains file- Specified by:
getToolchainsFilein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
setToolchainsFile
public InvocationRequest setToolchainsFile(File toolchains)
Sets the alternate path for the user toolchains file Equivalent of-tor--toolchains- Specified by:
setToolchainsFilein interfaceInvocationRequest- Parameters:
toolchains- the alternate path for the user toolchains file- Returns:
- This invocation request
-
getGlobalToolchainsFile
public File getGlobalToolchainsFile()
Alternate path for the global toolchains file Note. This is available since Maven 3.3.1- Specified by:
getGlobalToolchainsFilein interfaceInvocationRequest- Returns:
- a
Fileobject.
-
setGlobalToolchainsFile
public InvocationRequest setGlobalToolchainsFile(File toolchains)
Sets the alternate path for the global toolchains file Equivalent of-gtor--global-toolchains- Specified by:
setGlobalToolchainsFilein interfaceInvocationRequest- Parameters:
toolchains- the alternate path for the global toolchains file- Returns:
- This invocation request
-
getGlobalChecksumPolicy
public InvocationRequest.CheckSumPolicy getGlobalChecksumPolicy()
Gets the checksum mode of the Maven invocation.- Specified by:
getGlobalChecksumPolicyin interfaceInvocationRequest- Returns:
- a CheckSumPolicy object.
-
setGlobalChecksumPolicy
public InvocationRequest setGlobalChecksumPolicy(InvocationRequest.CheckSumPolicy globalChecksumPolicy)
Sets the checksum mode of the Maven invocation. Equivalent of-cor--lax-checksums,-Cor--strict-checksums- Specified by:
setGlobalChecksumPolicyin interfaceInvocationRequest- Parameters:
globalChecksumPolicy- a CheckSumPolicy object.- Returns:
- a
InvocationRequestobject.
-
getPomFileName
public String getPomFileName()
Gets the (unqualified) filename of the POM for the Maven invocation. This setting is ignored ifInvocationRequest.getPomFile()does not returnnull. Otherwise, the base directory is assumed to contain a POM with this name. By default, a file namedpom.xmlis used.- Specified by:
getPomFileNamein interfaceInvocationRequest- Returns:
- a
Stringobject.
-
setPomFileName
public InvocationRequest setPomFileName(String pomFilename)
Sets the (unqualified) filename of the POM for the Maven invocation. This setting is ignored ifInvocationRequest.getPomFile()does not returnnull. Otherwise, the base directory is assumed to contain a POM with this name.- Specified by:
setPomFileNamein interfaceInvocationRequest- Parameters:
pomFilename- The (unqualified) filename of the POM for the Maven invocation, may benullif not used.- Returns:
- This invocation request.
-
getProfiles
public List<String> getProfiles()
Gets the profiles for the Maven invocation.- Specified by:
getProfilesin interfaceInvocationRequest- Returns:
- a
Listobject.
-
setProfiles
public InvocationRequest setProfiles(List<String> profiles)
Sets the profiles for the Maven invocation. Equivalent of-Pand--active-profiles- Specified by:
setProfilesin interfaceInvocationRequest- Parameters:
profiles- The profiles for the Maven invocation, may benullto use the default profiles.- Returns:
- This invocation request.
-
isNonPluginUpdates
public boolean isNonPluginUpdates()
Indicates whether Maven should check for plugin updates. By default, plugin updates are not suppressed.- Specified by:
isNonPluginUpdatesin interfaceInvocationRequest- Returns:
- a boolean.
-
setNonPluginUpdates
public InvocationRequest setNonPluginUpdates(boolean nonPluginUpdates)
Specifies whether Maven should check for plugin updates.Equivalent of
-npuor--no-plugin-updatesnote: Ineffective with Maven3, only kept for backward compatibility
- Specified by:
setNonPluginUpdatesin interfaceInvocationRequest- Parameters:
nonPluginUpdates-trueif plugin updates should be suppressed,falseotherwise.- Returns:
- This invocation request.
-
addShellEnvironment
public InvocationRequest addShellEnvironment(String name, String value)
Adds the specified environment variable to the Maven invocation.- Specified by:
addShellEnvironmentin interfaceInvocationRequest- Parameters:
name- The name of the environment variable, must not benull.value- The value of the environment variable, must not benull.- Returns:
- This invocation request.
-
getShellEnvironments
public Map<String,String> getShellEnvironments()
Getter for the field
shellEnvironments.- Specified by:
getShellEnvironmentsin interfaceInvocationRequest- Returns:
- a
Mapobject.
-
getMavenOpts
public String getMavenOpts()
Getter for the field
mavenOpts.- Specified by:
getMavenOptsin interfaceInvocationRequest- Returns:
- a
Stringobject.
-
setMavenOpts
public InvocationRequest setMavenOpts(String mavenOpts)
Sets the value of theMAVEN_OPTSenvironment variable.- Specified by:
setMavenOptsin interfaceInvocationRequest- Parameters:
mavenOpts- The value of theMAVEN_OPTSenvironment variable, may benullto use the default options.- Returns:
- This invocation request.
-
isShowVersion
public boolean isShowVersion()
isShowVersion.
- Specified by:
isShowVersionin interfaceInvocationRequest- Returns:
- a boolean.
- See Also:
InvocationRequest.isShowVersion()
-
setShowVersion
public InvocationRequest setShowVersion(boolean showVersion)
enable displaying version without stopping the build Equivalent of-Vor--show-version- Specified by:
setShowVersionin interfaceInvocationRequest- Parameters:
showVersion- enable displaying version- Returns:
- This invocation request.
-
getThreads
public String getThreads()
Get the value of thethreadsargument.- Specified by:
getThreadsin interfaceInvocationRequest- Returns:
- a
Stringobject.
-
setThreads
public InvocationRequest setThreads(String threads)
Thread count, for instance 2.0C where C is core multiplied Equivalent of-Tor--threadsnote: available since Maven3
- Specified by:
setThreadsin interfaceInvocationRequest- Parameters:
threads- the threadcount- Returns:
- This invocation request.
-
getProjects
public List<String> getProjects()
A list of specified reactor projects to build instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path.- Specified by:
getProjectsin interfaceInvocationRequest- Returns:
- a
Listobject.
-
setProjects
public InvocationRequest setProjects(List<String> projects)
Sets the reactor project list. Equivalent of-plor--projects- Specified by:
setProjectsin interfaceInvocationRequest- Parameters:
projects- the reactor project list- Returns:
- This invocation request.
-
isAlsoMake
public boolean isAlsoMake()
Get the value of thealso-makeargument.- Specified by:
isAlsoMakein interfaceInvocationRequest- Returns:
- a boolean.
-
setAlsoMake
public InvocationRequest setAlsoMake(boolean alsoMake)
Enable the 'also make' mode. Equivalent of-amor--also-make- Specified by:
setAlsoMakein interfaceInvocationRequest- Parameters:
alsoMake- enable 'also make' mode- Returns:
- This invocation request.
-
isAlsoMakeDependents
public boolean isAlsoMakeDependents()
Get the value of thealso-make-dependents- Specified by:
isAlsoMakeDependentsin interfaceInvocationRequest- Returns:
- a boolean.
-
setAlsoMakeDependents
public InvocationRequest setAlsoMakeDependents(boolean alsoMakeDependents)
Enable the 'also make dependents' mode. Equivalent of-amdor--also-make-dependents- Specified by:
setAlsoMakeDependentsin interfaceInvocationRequest- Parameters:
alsoMakeDependents- enable 'also make' mode- Returns:
- This invocation request.
-
getResumeFrom
public String getResumeFrom()
Get the value ofresume-from- Specified by:
getResumeFromin interfaceInvocationRequest- Returns:
- a
Stringobject.
-
setResumeFrom
public InvocationRequest setResumeFrom(String resumeFrom)
Resume reactor from specified project. Equivalent of-rfor--resume-from- Specified by:
setResumeFromin interfaceInvocationRequest- Parameters:
resumeFrom- set the project to resume from- Returns:
- This invocation request
-
setBuilder
public InvocationRequest setBuilder(String id)
The id of the build strategy to use. equivalent of--builder id. Note. This is available since Maven 3.2.1- Specified by:
setBuilderin interfaceInvocationRequest- Parameters:
id- The builder id.- Returns:
InvocationRequestFIXME: How to identify if this is a valid command line option?
-
getBuilder
public String getBuilder()
Get the current set builder strategy id equivalent of--builder id. Note. This is available since Maven 3.2.1- Specified by:
getBuilderin interfaceInvocationRequest- Returns:
- a
Stringobject.
-
getTimeoutInSeconds
public int getTimeoutInSeconds()
getTimeoutInSeconds.
- Specified by:
getTimeoutInSecondsin interfaceInvocationRequest- Returns:
- the timeout in seconds to execute the project
-
setTimeoutInSeconds
public void setTimeoutInSeconds(int timeoutInSeconds)
setTimeoutInSeconds.
- Specified by:
setTimeoutInSecondsin interfaceInvocationRequest- Parameters:
timeoutInSeconds- the timeout in seconds to execute the project
-
isQuiet
public boolean isQuiet()
Gets the quiet mode of the Maven invocation. By default, Maven is executed in normal mode.- Specified by:
isQuietin interfaceInvocationRequest- Returns:
- a boolean.
- Since:
- 3.1.0
-
setQuiet
public InvocationRequest setQuiet(boolean quiet)
Sets the quiet mode of the Maven invocation. Equivalent of-qand--quiet- Specified by:
setQuietin interfaceInvocationRequest- Parameters:
quiet-trueif Maven should be executed in quiet mode,falseif the normal mode should be used.- Returns:
- This invocation request.
-
-