|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Specifies the parameters used to control a Maven invocation.
| Field Summary | |
static java.lang.String |
CHECKSUM_POLICY_FAIL
The strict checksum policy which fails the build if a corrupt artifact is detected. |
static java.lang.String |
CHECKSUM_POLICY_WARN
The lax checksum policy which only outputs a warning if a corrupt artifact is detected. |
static java.lang.String |
REACTOR_FAIL_AT_END
The failure mode "fail-at-end" where the build is only failed at its very end if necessary. |
static java.lang.String |
REACTOR_FAIL_FAST
The failure mode "fail-fast" where the build is stopped by the first failure. |
static java.lang.String |
REACTOR_FAIL_NEVER
The failure mode "fail-never" in which Maven will always exit with code 0 regardless of build failures. |
| Method Summary | |
InvocationRequest |
activateReactor(java.lang.String[] includes,
java.lang.String[] excludes)
Dynamically constructs a reactor using the subdirectories of the current directory |
InvocationRequest |
addShellEnvironment(java.lang.String name,
java.lang.String value)
Adds the specified environment variable to the Maven invocation. |
java.lang.String[] |
getActivatedReactorExcludes()
Gets the list of subdirectory patterns to exclude from search |
java.lang.String[] |
getActivatedReactorIncludes()
Gets the list of subdirectory patterns to search |
java.io.File |
getBaseDirectory()
Gets the path to the base directory of the POM for the Maven invocation. |
java.io.File |
getBaseDirectory(java.io.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. |
java.lang.String |
getFailureBehavior()
Gets the failure mode of the Maven invocation. |
java.lang.String |
getGlobalChecksumPolicy()
Gets the checksum mode of the Maven invocation. |
java.util.List |
getGoals()
Gets the goals for the Maven invocation. |
java.io.InputStream |
getInputStream(java.io.InputStream defaultStream)
Gets the input stream used to provide input for the invoked Maven build. |
java.io.File |
getJavaHome()
Gets the path to the base directory of the Java installation used to run Maven. |
java.io.File |
getLocalRepositoryDirectory(java.io.File defaultDirectory)
Gets the path to the base directory of the local repository to use for the Maven invocation. |
java.lang.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. |
java.io.File |
getPomFile()
Gets the path to the POM for the Maven invocation. |
java.lang.String |
getPomFileName()
Gets the (unqualified) filename of the POM for the Maven invocation. |
java.util.List |
getProfiles()
Gets the profiles for the Maven invocation. |
java.util.Properties |
getProperties()
Gets the system properties for the Maven invocation. |
java.util.Map |
getShellEnvironments()
Gets the environment variables for the Maven invocation. |
java.io.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 |
isShowVersion()
The show version behaviour (-V option) |
boolean |
isUpdateSnapshots()
Indicates whether Maven should enforce an update check for plugins and snapshots. |
InvocationRequest |
setBaseDirectory(java.io.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(java.lang.String failureBehavior)
Sets the failure mode of the Maven invocation. |
InvocationRequest |
setGlobalChecksumPolicy(java.lang.String globalChecksumPolicy)
Sets the checksum mode of the Maven invocation. |
InvocationRequest |
setGoals(java.util.List goals)
Sets the goals for the Maven invocation. |
InvocationRequest |
setInputStream(java.io.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(java.io.File javaHome)
Sets the path to the base directory of the Java installation used to run Maven. |
InvocationRequest |
setLocalRepositoryDirectory(java.io.File localRepository)
Sets the path to the base directory of the local repository to use for the Maven invocation. |
InvocationRequest |
setMavenOpts(java.lang.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(java.io.File pomFile)
Sets the path to the POM for the Maven invocation. |
InvocationRequest |
setPomFileName(java.lang.String pomFilename)
Sets the (unqualified) filename of the POM for the Maven invocation. |
InvocationRequest |
setProfiles(java.util.List profiles)
Sets the profiles for the Maven invocation. |
InvocationRequest |
setProperties(java.util.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 |
setShowVersion(boolean showVersion)
enable displaying version without stopping the build (-V cli option) |
InvocationRequest |
setUpdateSnapshots(boolean updateSnapshots)
Specifies whether Maven should enforce an update check for plugins and snapshots. |
InvocationRequest |
setUserSettingsFile(java.io.File userSettings)
Sets the path to the user settings for the Maven invocation. |
| Field Detail |
public static final java.lang.String REACTOR_FAIL_FAST
public static final java.lang.String REACTOR_FAIL_AT_END
public static final java.lang.String REACTOR_FAIL_NEVER
public static final java.lang.String CHECKSUM_POLICY_FAIL
public static final java.lang.String CHECKSUM_POLICY_WARN
| Method Detail |
public boolean isInteractive()
true if Maven should be executed in interactive mode, false if the batch
mode is used.public boolean isOffline()
true if Maven should be executed in offline mode, false if the online mode
is used.public boolean isUpdateSnapshots()
true if plugins and snapshots should be updated, false otherwise.public boolean isRecursive()
true if sub modules should be build, false otherwise.public boolean isActivatedReactor()
true if we should search subdirectories, false otherwisepublic java.lang.String[] getActivatedReactorIncludes()
null in which case defaults should be usedpublic java.lang.String[] getActivatedReactorExcludes()
null in which case nothing should be excludedpublic boolean isDebug()
true if Maven should be executed in debug mode, false if the normal mode
should be used.public boolean isShowErrors()
true if Maven should print stack traces, false otherwise.public boolean isShellEnvironmentInherited()
true if the environment variables should be propagated, false otherwise.public boolean isNonPluginUpdates()
true if plugin updates should be suppressed, false otherwise.public java.lang.String getFailureBehavior()
REACTOR_FAIL_FAST is used.
REACTOR_FAIL_FAST, REACTOR_FAIL_AT_END and
REACTOR_FAIL_NEVER.public java.io.File getLocalRepositoryDirectory(java.io.File defaultDirectory)
defaultDirectory - 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 java.io.InputStream getInputStream(java.io.InputStream defaultStream)
null if not set.public InvocationOutputHandler getOutputHandler(InvocationOutputHandler defaultHandler)
null if not set.public InvocationOutputHandler getErrorHandler(InvocationOutputHandler defaultHandler)
null if not set.public java.io.File getPomFile()
null if not set.public java.lang.String getPomFileName()
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.
null if not set.public java.io.File getBaseDirectory()
getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
null if not set.public java.io.File getBaseDirectory(java.io.File defaultDirectory)
getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
defaultDirectory - The default base directory to use if none is configured for this request, may be
null.
null if not set.public java.io.File getJavaHome()
null to use
the default Java home.public java.util.Properties getProperties()
null if not set.public java.util.List getGoals()
null if not set.public java.io.File getUserSettingsFile()
null to load the user settings
from the default location.public java.lang.String getGlobalChecksumPolicy()
CHECKSUM_POLICY_WARN and CHECKSUM_POLICY_FAIL.public java.util.List getProfiles()
null if not set.public java.util.Map getShellEnvironments()
null if not set.public java.lang.String getMavenOpts()
MAVEN_OPTS environment variable.
MAVEN_OPTS environment variable or null if not set.public boolean isShowVersion()
public InvocationRequest setInteractive(boolean interactive)
interactive - true if Maven should be executed in interactive mode, false if
the batch mode is used.
public InvocationRequest setOffline(boolean offline)
offline - true if Maven should be executed in offline mode, false if the
online mode is used.
public InvocationRequest setDebug(boolean debug)
debug - true if Maven should be executed in debug mode, false if the normal
mode should be used.
public InvocationRequest setShowErrors(boolean showErrors)
showErrors - true if Maven should print stack traces, false otherwise.
public InvocationRequest setUpdateSnapshots(boolean updateSnapshots)
updateSnapshots - true if plugins and snapshots should be updated, false
otherwise.
public InvocationRequest setFailureBehavior(java.lang.String failureBehavior)
failureBehavior - The failure mode, must be one of REACTOR_FAIL_FAST, REACTOR_FAIL_AT_END
and REACTOR_FAIL_NEVER.
public InvocationRequest activateReactor(java.lang.String[] includes,
java.lang.String[] excludes)
includes - 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 InvocationRequest setLocalRepositoryDirectory(java.io.File localRepository)
localRepository - The path to the base directory of the local repository, may be null.
public InvocationRequest setInputStream(java.io.InputStream inputStream)
inputStream - The input stream used to provide input for the invoked Maven build, may be null
if not required.
public InvocationRequest setOutputHandler(InvocationOutputHandler outputHandler)
outputHandler - The output handler, may be null if the output is not of interest.
public InvocationRequest setErrorHandler(InvocationOutputHandler errorHandler)
errorHandler - The error handler, may be null if the output is not of interest.
public InvocationRequest setPomFile(java.io.File pomFile)
pomFile - The path to the POM for the Maven invocation, may be null if not used.
public InvocationRequest setPomFileName(java.lang.String pomFilename)
getPomFile() does not return null. Otherwise, the base directory is assumed to contain a
POM with this name.
pomFilename - The (unqualified) filename of the POM for the Maven invocation, may be null if
not used.
public InvocationRequest setBaseDirectory(java.io.File basedir)
getPomFile() does not return
null, this setting only affects the working directory for the Maven invocation.
basedir - The path to the base directory of the POM, may be null if not used.
public InvocationRequest setJavaHome(java.io.File javaHome)
javaHome - The path to the base directory of the Java installation used to run Maven, may be
null to use the default Java home.
public InvocationRequest setProperties(java.util.Properties properties)
properties - The system properties for the Maven invocation, may be null if not set.
public InvocationRequest setGoals(java.util.List goals)
goals - The goals for the Maven invocation, may be null to execute the POMs default goal.
public InvocationRequest setProfiles(java.util.List profiles)
profiles - The profiles for the Maven invocation, may be null to use the default profiles.
public InvocationRequest setShellEnvironmentInherited(boolean shellEnvironmentInherited)
shellEnvironmentInherited - true if the environment variables should be propagated,
false otherwise.
public InvocationRequest setUserSettingsFile(java.io.File userSettings)
userSettings - The path to the user settings for the Maven invocation, may be null to load
the user settings from the default location.
public InvocationRequest setGlobalChecksumPolicy(java.lang.String globalChecksumPolicy)
globalChecksumPolicy - The checksum mode, must be one of CHECKSUM_POLICY_WARN and
CHECKSUM_POLICY_FAIL.
public InvocationRequest setNonPluginUpdates(boolean nonPluginUpdates)
nonPluginUpdates - true if plugin updates should be suppressed, false
otherwise.
public InvocationRequest setRecursive(boolean recursive)
recursive - true if sub modules should be build, false otherwise.
public InvocationRequest addShellEnvironment(java.lang.String name,
java.lang.String value)
name - The name of the environment variable, must not be null.value - The value of the environment variable, must not be null.
public InvocationRequest setMavenOpts(java.lang.String mavenOpts)
MAVEN_OPTS environment variable.
mavenOpts - The value of the MAVEN_OPTS environment variable, may be null to
use the default options.
public InvocationRequest setShowVersion(boolean showVersion)
showVersion - enable displaying version
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||