|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.shared.invoker.DefaultInvocationRequest
public class DefaultInvocationRequest
Specifies the parameters used to control a Maven invocation.
| Field Summary |
|---|
| Fields inherited from interface org.apache.maven.shared.invoker.InvocationRequest |
|---|
CHECKSUM_POLICY_FAIL, CHECKSUM_POLICY_WARN, REACTOR_FAIL_AT_END, REACTOR_FAIL_FAST, REACTOR_FAIL_NEVER |
| Constructor Summary | |
|---|---|
DefaultInvocationRequest()
|
|
| Method Summary | |
|---|---|
InvocationRequest |
activateReactor(String[] includes,
String[] excludes)
Dynamically constructs a reactor using the subdirectories of the current directory |
InvocationRequest |
addShellEnvironment(String name,
String value)
Adds the specified environment variable to the Maven invocation. |
String[] |
getActivatedReactorExcludes()
Gets the list of subdirectory patterns to exclude from search |
String[] |
getActivatedReactorIncludes()
Gets the list of subdirectory patterns to search |
File |
getBaseDirectory()
Gets the path to the base directory of the POM for the Maven invocation. |
File |
getBaseDirectory(File defaultDirectory)
Gets the path to the base directory of the POM for the Maven invocation. |
InvocationOutputHandler |
getErrorHandler(InvocationOutputHandler defaultHandler)
Gets the handler used to capture the error output from the Maven build. |
String |
getFailureBehavior()
Gets the failure mode of the Maven invocation. |
String |
getGlobalChecksumPolicy()
Gets the checksum mode of the Maven invocation. |
List |
getGoals()
Gets the goals for the Maven invocation. |
InputStream |
getInputStream(InputStream defaultStream)
Gets the input stream used to provide input for the invoked Maven build. |
File |
getJavaHome()
Gets the path to the base directory of the Java installation used to run Maven. |
File |
getLocalRepositoryDirectory(File defaultDirectory)
Gets the path to the base directory of the local repository to use for the Maven invocation. |
String |
getMavenOpts()
Gets the value of the MAVEN_OPTS environment variable. |
InvocationOutputHandler |
getOutputHandler(InvocationOutputHandler defaultHandler)
Gets the handler used to capture the standard output from the Maven build. |
File |
getPomFile()
Gets the path to the POM for the Maven invocation. |
String |
getPomFileName()
Gets the (unqualified) filename of the POM for the Maven invocation. |
List |
getProfiles()
Gets the profiles for the Maven invocation. |
Properties |
getProperties()
Gets the system properties for the Maven invocation. |
Map |
getShellEnvironments()
Gets the environment variables for the Maven invocation. |
File |
getUserSettingsFile()
Gets the path to the user settings for the Maven invocation. |
boolean |
isActivatedReactor()
Gets whether Maven should search subdirectories to build a dynamic reactor |
boolean |
isDebug()
Gets the debug mode of the Maven invocation. |
boolean |
isInteractive()
Gets the interaction mode of the Maven invocation. |
boolean |
isNonPluginUpdates()
Indicates whether Maven should check for plugin updates. |
boolean |
isOffline()
Gets the network mode of the Maven invocation. |
boolean |
isRecursive()
Gets the recursion behavior of a reactor invocation. |
boolean |
isShellEnvironmentInherited()
Indicates whether the environment variables of the current process should be propagated to the Maven invocation. |
boolean |
isShowErrors()
Gets the exception output mode of the Maven invocation. |
boolean |
isUpdateSnapshots()
Indicates whether Maven should enforce an update check for plugins and snapshots. |
InvocationRequest |
setBaseDirectory(File basedir)
Sets the path to the base directory of the POM for the Maven invocation. |
InvocationRequest |
setDebug(boolean debug)
Sets the debug mode of the Maven invocation. |
InvocationRequest |
setErrorHandler(InvocationOutputHandler errorHandler)
Sets the handler used to capture the error output from the Maven build. |
InvocationRequest |
setFailureBehavior(String failureBehavior)
Sets the failure mode of the Maven invocation. |
InvocationRequest |
setGlobalChecksumPolicy(String globalChecksumPolicy)
Sets the checksum mode of the Maven invocation. |
InvocationRequest |
setGoals(List goals)
Sets the goals for the Maven invocation. |
InvocationRequest |
setInputStream(InputStream inputStream)
Sets the input stream used to provide input for the invoked Maven build. |
InvocationRequest |
setInteractive(boolean interactive)
Sets the interaction mode of the Maven invocation. |
InvocationRequest |
setJavaHome(File javaHome)
Sets the path to the base directory of the Java installation used to run Maven. |
InvocationRequest |
setLocalRepositoryDirectory(File localRepository)
Sets the path to the base directory of the local repository to use for the Maven invocation. |
InvocationRequest |
setMavenOpts(String mavenOpts)
Sets the value of the MAVEN_OPTS environment variable. |
InvocationRequest |
setNonPluginUpdates(boolean nonPluginUpdates)
Specifies whether Maven should check for plugin updates. |
InvocationRequest |
setOffline(boolean offline)
Sets the network mode of the Maven invocation. |
InvocationRequest |
setOutputHandler(InvocationOutputHandler outputHandler)
Sets the handler used to capture the standard output from the Maven build. |
InvocationRequest |
setPomFile(File pomFile)
Sets the path to the POM for the Maven invocation. |
InvocationRequest |
setPomFileName(String pomFilename)
Sets the (unqualified) filename of the POM for the Maven invocation. |
InvocationRequest |
setProfiles(List profiles)
Sets the profiles for the Maven invocation. |
InvocationRequest |
setProperties(Properties properties)
Sets the system properties for the Maven invocation. |
InvocationRequest |
setRecursive(boolean recursive)
Sets the recursion behavior of a reactor invocation. |
InvocationRequest |
setShellEnvironmentInherited(boolean shellEnvironmentInherited)
Specifies whether the environment variables of the current process should be propagated to the Maven invocation. |
InvocationRequest |
setShowErrors(boolean showErrors)
Sets the exception output mode of the Maven invocation. |
InvocationRequest |
setUpdateSnapshots(boolean updateSnapshots)
Specifies whether Maven should enforce an update check for plugins and snapshots. |
InvocationRequest |
setUserSettingsFile(File userSettings)
Sets the path to the user settings for the Maven invocation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultInvocationRequest()
| Method Detail |
|---|
public InvocationRequest activateReactor(String[] includes,
String[] excludes)
InvocationRequest
activateReactor in interface InvocationRequestincludes - a list of filename patterns to include, or null, in which case the default is */pom.xmlexcludes - a list of filename patterns to exclude, or null, in which case nothing is excluded
public File getBaseDirectory()
InvocationRequestInvocationRequest.getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
getBaseDirectory in interface InvocationRequestnull if not set.public File getBaseDirectory(File defaultDirectory)
InvocationRequestInvocationRequest.getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
getBaseDirectory in interface InvocationRequestdefaultDirectory - The default base directory to use if none is configured for this request, may be
null.
null if not set.public InvocationOutputHandler getErrorHandler(InvocationOutputHandler defaultHandler)
InvocationRequest
getErrorHandler in interface InvocationRequestnull if not set.public String getFailureBehavior()
InvocationRequestInvocationRequest.REACTOR_FAIL_FAST is used.
getFailureBehavior in interface InvocationRequestInvocationRequest.REACTOR_FAIL_FAST, InvocationRequest.REACTOR_FAIL_AT_END and
InvocationRequest.REACTOR_FAIL_NEVER.public List getGoals()
InvocationRequest
getGoals in interface InvocationRequestnull if not set.public InputStream getInputStream(InputStream defaultStream)
InvocationRequest
getInputStream in interface InvocationRequestnull if not set.public File getLocalRepositoryDirectory(File defaultDirectory)
InvocationRequest
getLocalRepositoryDirectory in interface InvocationRequestdefaultDirectory - The default location to use if no location is configured for this request, may be
null.
null to use the location from
the settings.xml.public InvocationOutputHandler getOutputHandler(InvocationOutputHandler defaultHandler)
InvocationRequest
getOutputHandler in interface InvocationRequestnull if not set.public File getPomFile()
InvocationRequest
getPomFile in interface InvocationRequestnull if not set.public Properties getProperties()
InvocationRequest
getProperties in interface InvocationRequestnull if not set.public boolean isDebug()
InvocationRequest
isDebug in interface InvocationRequesttrue if Maven should be executed in debug mode, false if the normal mode
should be used.public boolean isInteractive()
InvocationRequest
isInteractive in interface InvocationRequesttrue if Maven should be executed in interactive mode, false if the batch
mode is used.public boolean isOffline()
InvocationRequest
isOffline in interface InvocationRequesttrue if Maven should be executed in offline mode, false if the online mode
is used.public boolean isShowErrors()
InvocationRequest
isShowErrors in interface InvocationRequesttrue if Maven should print stack traces, false otherwise.public boolean isUpdateSnapshots()
InvocationRequest
isUpdateSnapshots in interface InvocationRequesttrue if plugins and snapshots should be updated, false otherwise.public boolean isRecursive()
InvocationRequest
isRecursive in interface InvocationRequesttrue if sub modules should be build, false otherwise.public InvocationRequest setRecursive(boolean recursive)
InvocationRequest
setRecursive in interface InvocationRequestrecursive - true if sub modules should be build, false otherwise.
public InvocationRequest setBaseDirectory(File basedir)
InvocationRequestInvocationRequest.getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
setBaseDirectory in interface InvocationRequestbasedir - The path to the base directory of the POM, may be null if not used.
public InvocationRequest setDebug(boolean debug)
InvocationRequest
setDebug in interface InvocationRequestdebug - true if Maven should be executed in debug mode, false if the normal
mode should be used.
public InvocationRequest setErrorHandler(InvocationOutputHandler errorHandler)
InvocationRequest
setErrorHandler in interface InvocationRequesterrorHandler - The error handler, may be null if the output is not of interest.
public InvocationRequest setFailureBehavior(String failureBehavior)
InvocationRequest
setFailureBehavior in interface InvocationRequestfailureBehavior - The failure mode, must be one of InvocationRequest.REACTOR_FAIL_FAST, InvocationRequest.REACTOR_FAIL_AT_END
and InvocationRequest.REACTOR_FAIL_NEVER.
public InvocationRequest setGoals(List goals)
InvocationRequest
setGoals in interface InvocationRequestgoals - The goals for the Maven invocation, may be null to execute the POMs default goal.
public InvocationRequest setInputStream(InputStream inputStream)
InvocationRequest
setInputStream in interface InvocationRequestinputStream - The input stream used to provide input for the invoked Maven build, may be null
if not required.
public InvocationRequest setInteractive(boolean interactive)
InvocationRequest
setInteractive in interface InvocationRequestinteractive - true if Maven should be executed in interactive mode, false if
the batch mode is used.
public InvocationRequest setLocalRepositoryDirectory(File localRepository)
InvocationRequest
setLocalRepositoryDirectory in interface InvocationRequestlocalRepository - The path to the base directory of the local repository, may be null.
public InvocationRequest setOffline(boolean offline)
InvocationRequest
setOffline in interface InvocationRequestoffline - true if Maven should be executed in offline mode, false if the
online mode is used.
public InvocationRequest setOutputHandler(InvocationOutputHandler outputHandler)
InvocationRequest
setOutputHandler in interface InvocationRequestoutputHandler - The output handler, may be null if the output is not of interest.
public InvocationRequest setPomFile(File pomFile)
InvocationRequest
setPomFile in interface InvocationRequestpomFile - The path to the POM for the Maven invocation, may be null if not used.
public InvocationRequest setProperties(Properties properties)
InvocationRequest
setProperties in interface InvocationRequestproperties - The system properties for the Maven invocation, may be null if not set.
public InvocationRequest setShowErrors(boolean showErrors)
InvocationRequest
setShowErrors in interface InvocationRequestshowErrors - true if Maven should print stack traces, false otherwise.
public InvocationRequest setUpdateSnapshots(boolean updateSnapshots)
InvocationRequest
setUpdateSnapshots in interface InvocationRequestupdateSnapshots - true if plugins and snapshots should be updated, false
otherwise.
public boolean isShellEnvironmentInherited()
InvocationRequest
isShellEnvironmentInherited in interface InvocationRequesttrue if the environment variables should be propagated, false otherwise.public InvocationRequest setShellEnvironmentInherited(boolean shellEnvironmentInherited)
InvocationRequest
setShellEnvironmentInherited in interface InvocationRequestshellEnvironmentInherited - true if the environment variables should be propagated,
false otherwise.
public File getJavaHome()
InvocationRequest
getJavaHome in interface InvocationRequestnull to use
the default Java home.public InvocationRequest setJavaHome(File javaHome)
InvocationRequest
setJavaHome in interface InvocationRequestjavaHome - The path to the base directory of the Java installation used to run Maven, may be
null to use the default Java home.
public File getUserSettingsFile()
InvocationRequest
getUserSettingsFile in interface InvocationRequestnull to load the user settings
from the default location.public InvocationRequest setUserSettingsFile(File userSettings)
InvocationRequest
setUserSettingsFile in interface InvocationRequestuserSettings - The path to the user settings for the Maven invocation, may be null to load
the user settings from the default location.
public String getGlobalChecksumPolicy()
InvocationRequest
getGlobalChecksumPolicy in interface InvocationRequestInvocationRequest.CHECKSUM_POLICY_WARN and InvocationRequest.CHECKSUM_POLICY_FAIL.public InvocationRequest setGlobalChecksumPolicy(String globalChecksumPolicy)
InvocationRequest
setGlobalChecksumPolicy in interface InvocationRequestglobalChecksumPolicy - The checksum mode, must be one of InvocationRequest.CHECKSUM_POLICY_WARN and
InvocationRequest.CHECKSUM_POLICY_FAIL.
public String getPomFileName()
InvocationRequestInvocationRequest.getPomFile() does not return null. Otherwise, the base directory is assumed to contain a
POM with this name. By default, a file named pom.xml is used.
getPomFileName in interface InvocationRequestnull if not set.public InvocationRequest setPomFileName(String pomFilename)
InvocationRequestInvocationRequest.getPomFile() does not return null. Otherwise, the base directory is assumed to contain a
POM with this name.
setPomFileName in interface InvocationRequestpomFilename - The (unqualified) filename of the POM for the Maven invocation, may be null if
not used.
public List getProfiles()
InvocationRequest
getProfiles in interface InvocationRequestnull if not set.public InvocationRequest setProfiles(List profiles)
InvocationRequest
setProfiles in interface InvocationRequestprofiles - The profiles for the Maven invocation, may be null to use the default profiles.
public boolean isNonPluginUpdates()
InvocationRequest
isNonPluginUpdates in interface InvocationRequesttrue if plugin updates should be suppressed, false otherwise.public InvocationRequest setNonPluginUpdates(boolean nonPluginUpdates)
InvocationRequest
setNonPluginUpdates in interface InvocationRequestnonPluginUpdates - true if plugin updates should be suppressed, false
otherwise.
public InvocationRequest addShellEnvironment(String name,
String value)
InvocationRequest
addShellEnvironment in interface InvocationRequestname - The name of the environment variable, must not be null.value - The value of the environment variable, must not be null.
public Map getShellEnvironments()
InvocationRequest
getShellEnvironments in interface InvocationRequestnull if not set.public String getMavenOpts()
InvocationRequestMAVEN_OPTS environment variable.
getMavenOpts in interface InvocationRequestMAVEN_OPTS environment variable or null if not set.public InvocationRequest setMavenOpts(String mavenOpts)
InvocationRequestMAVEN_OPTS environment variable.
setMavenOpts in interface InvocationRequestmavenOpts - The value of the MAVEN_OPTS environment variable, may be null to
use the default options.
public boolean isActivatedReactor()
InvocationRequest
isActivatedReactor in interface InvocationRequesttrue if we should search subdirectories, false otherwisepublic String[] getActivatedReactorIncludes()
InvocationRequest
getActivatedReactorIncludes in interface InvocationRequestnull in which case defaults should be usedpublic String[] getActivatedReactorExcludes()
InvocationRequest
getActivatedReactorExcludes in interface InvocationRequestnull in which case nothing should be excluded
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||