Interface InvokerRequest
- All Known Implementing Classes:
BaseInvokerRequest
Represents a Maven invocation request, encapsulating all necessary information
for invoking a Maven build or command. Arguments are parsed and exposed via methods.
- Since:
- 4.0.0
-
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.default boolean
This method returns "verbose" option value derived from multiple places: CLI options, but also CI detection, if applicable.default boolean
embedded()
Returnstrue
if this call happens in "embedded" mode.Returns the Maven installation directory.default Lookup
lookup()
Shorthand forLookup
.default MessageBuilderFactory
Shorthand forMessageBuilderFactory
.options()
Returns the options associated with this invocation request.The parser request this instance was created from.boolean
Flag representing parser processing result: if there were some fatal errors duringParser.parseInvocation(ParserRequest)
this method will returntrue
and invoker should handle this request as "early failure".Returns the root directory of the Maven invocation, if found.default Optional
<OutputStream> stdErr()
Returns the error stream for the Maven execution, if running in embedded mode.default Optional
<InputStream> stdIn()
Returns the input stream for the Maven execution, if running in embedded mode.default Optional
<OutputStream> stdOut()
Returns the output stream for the Maven execution, if running in embedded mode.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.
-
Method Details
-
parserRequest
The parser request this instance was created from. -
parsingFailed
boolean parsingFailed()Flag representing parser processing result: if there were some fatal errors duringParser.parseInvocation(ParserRequest)
this method will returntrue
and invoker should handle this request as "early failure". In these cases,options()
usually is absent. -
embedded
default boolean embedded()Returnstrue
if this call happens in "embedded" mode.- See Also:
-
cwd
-
installationDirectory
-
userHomeDirectory
-
messageBuilderFactory
Shorthand forMessageBuilderFactory
. -
lookup
-
userProperties
-
systemProperties
-
topDirectory
-
rootDirectory
Returns the root directory of the Maven invocation, if found. This is determined by the presence of a.mvn
directory or a POM with the root="true" property but is not always applicable (ie invocation from outside a checkout).- Returns:
- the root directory path, if present
-
stdIn
Returns the input stream for the Maven execution, if running in embedded mode.- Returns:
- an
Optional
containing the input stream, or empty if not applicable
-
stdOut
Returns the output stream for the Maven execution, if running in embedded mode.- Returns:
- an
Optional
containing the output stream, or empty if not applicable
-
stdErr
Returns the error stream for the Maven execution, if running in embedded mode.- Returns:
- an
Optional
containing the error stream, or empty if not applicable
-
coreExtensions
Returns a list of core extensions from all sources, that were discovered and loaded. Each instance ofCoreExtensions
is validated, but the list elements may have overlapping elements, that requires some logic to sort out (like precedence).The list of
CoreExtensions
if present, is in precedence order.- Returns:
- an
Optional
containing theCoreExtensions
, or empty if not configured
-
ciInfo
-
options
Returns the options associated with this invocation request.- Returns:
- the options optional. It will be absent if
parsingFailed()
returntrue
.
-
effectiveVerbose
default boolean effectiveVerbose()This method returns "verbose" option value derived from multiple places: CLI options, but also CI detection, if applicable.
-