Class BaseInvokerRequest
java.lang.Object
org.apache.maven.cling.invoker.BaseInvokerRequest
- All Implemented Interfaces:
InvokerRequest
-
Constructor Summary
ConstructorsConstructorDescriptionBaseInvokerRequest(ParserRequest parserRequest, boolean parsingFailed, Path cwd, Path installationDirectory, Path userHomeDirectory, Map<String, String> userProperties, Map<String, String> systemProperties, Path topDirectory, Path rootDirectory, List<CoreExtensions> coreExtensions, CIInfo ciInfo, Options options) -
Method Summary
Modifier and TypeMethodDescriptionciInfo()Returns detected CI system, if any.Returns a list of core extensions from all sources, that were discovered and loaded.cwd()Returns the current working directory for the Maven execution.Returns the Maven installation directory.options()Returns the options associated with this invocation request.The parser request this instance was created from.booleanFlag representing parser processing result: if there were some fatal errors duringParser.parseInvocation(ParserRequest)this method will returntrueand invoker should handle this request as "early failure".Returns the root directory of the Maven invocation, if found.Returns a map of system properties for the Maven execution.Returns the top-level directory of the Maven invocation.Returns the user's home directory.Returns a map of user-defined properties for the Maven execution.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.api.cli.InvokerRequest
effectiveVerbose, embedded, lookup, messageBuilderFactory, stdErr, stdIn, stdOut
-
Constructor Details
-
BaseInvokerRequest
public BaseInvokerRequest(@Nonnull ParserRequest parserRequest, boolean parsingFailed, @Nonnull Path cwd, @Nonnull Path installationDirectory, @Nonnull Path userHomeDirectory, @Nonnull Map<String, String> userProperties, @Nonnull Map<String, String> systemProperties, @Nonnull Path topDirectory, @Nullable Path rootDirectory, @Nullable List<CoreExtensions> coreExtensions, @Nullable CIInfo ciInfo, @Nullable Options options)
-
-
Method Details
-
parserRequest
Description copied from interface:InvokerRequestThe parser request this instance was created from.- Specified by:
parserRequestin interfaceInvokerRequest
-
parsingFailed
public boolean parsingFailed()Description copied from interface:InvokerRequestFlag representing parser processing result: if there were some fatal errors duringParser.parseInvocation(ParserRequest)this method will returntrueand invoker should handle this request as "early failure". In these cases,InvokerRequest.options()usually is absent.- Specified by:
parsingFailedin interfaceInvokerRequest
-
cwd
Description copied from interface:InvokerRequestReturns the current working directory for the Maven execution. This is typically the directory from which Maven was invoked.- Specified by:
cwdin interfaceInvokerRequest- Returns:
- the current working directory path
-
installationDirectory
Description copied from interface:InvokerRequestReturns the Maven installation directory. This is usually set by the Maven launcher script using the "maven.home" system property.- Specified by:
installationDirectoryin interfaceInvokerRequest- Returns:
- the Maven installation directory path
-
userHomeDirectory
Description copied from interface:InvokerRequestReturns the user's home directory. This is typically obtained from the "user.home" system property.- Specified by:
userHomeDirectoryin interfaceInvokerRequest- Returns:
- the user's home directory path
-
userProperties
Description copied from interface:InvokerRequestReturns a map of user-defined properties for the Maven execution. These properties can be set using the -D command-line option.- Specified by:
userPropertiesin interfaceInvokerRequest- Returns:
- an unmodifiable map of user properties
-
systemProperties
Description copied from interface:InvokerRequestReturns a map of system properties for the Maven execution. These include both Java system properties and Maven-specific system properties.- Specified by:
systemPropertiesin interfaceInvokerRequest- Returns:
- an unmodifiable map of system properties
-
topDirectory
Description copied from interface:InvokerRequestReturns the top-level directory of the Maven invocation. This is typically the directory containing the POM file being executed.- Specified by:
topDirectoryin interfaceInvokerRequest- Returns:
- the top-level directory path
-
rootDirectory
Description copied from interface:InvokerRequestReturns the root directory of the Maven invocation, if found. This is determined by the presence of a.mvndirectory or a POM with the root="true" property but is not always applicable (ie invocation from outside a checkout).- Specified by:
rootDirectoryin interfaceInvokerRequest- Returns:
- the root directory path, if present
-
coreExtensions
Description copied from interface:InvokerRequestReturns a list of core extensions from all sources, that were discovered and loaded. Each instance ofCoreExtensionsis validated, but the list elements may have overlapping elements, that requires some logic to sort out (like precedence).The list of
CoreExtensionsif present, is in precedence order.- Specified by:
coreExtensionsin interfaceInvokerRequest- Returns:
- an
Optionalcontaining theCoreExtensions, or empty if not configured
-
ciInfo
Description copied from interface:InvokerRequestReturns detected CI system, if any.- Specified by:
ciInfoin interfaceInvokerRequest- Returns:
- an
Optionalcontaining theCIInfocollected from CI system. or empty if CI not detected.
-
options
Description copied from interface:InvokerRequestReturns the options associated with this invocation request.- Specified by:
optionsin interfaceInvokerRequest- Returns:
- the options optional. It will be absent if
InvokerRequest.parsingFailed()returntrue.
-