Package org.apache.maven.cling.invoker
Class BaseInvokerRequest
java.lang.Object
org.apache.maven.cling.invoker.BaseInvokerRequest
- All Implemented Interfaces:
InvokerRequest
- Direct Known Subclasses:
EncryptInvokerRequest
,MavenInvokerRequest
-
Constructor Summary
ConstructorDescriptionBaseInvokerRequest
(ParserRequest parserRequest, Path cwd, Path installationDirectory, Path userHomeDirectory, Map<String, String> userProperties, Map<String, String> systemProperties, Path topDirectory, Path rootDirectory, InputStream in, OutputStream out, OutputStream err, List<CoreExtension> coreExtensions, List<String> jvmArguments) -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of core extensions, if configured in the .mvn/extensions.xml file.cwd()
Returns the current working directory for the Maven execution.err()
Returns the error stream for the Maven execution, if running in embedded mode.in()
Returns the input stream for the Maven execution, if running in embedded mode.Returns the Maven installation directory.Returns the list of extra JVM arguments to be passed to the forked process.out()
Returns the output stream for the Maven execution, if running in embedded mode.The parser request this instance was created from.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, wait
Methods inherited from interface org.apache.maven.api.cli.InvokerRequest
logger, lookup, messageBuilderFactory, options
-
Constructor Details
-
BaseInvokerRequest
public BaseInvokerRequest(@Nonnull ParserRequest parserRequest, @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 InputStream in, @Nullable OutputStream out, @Nullable OutputStream err, @Nullable List<CoreExtension> coreExtensions, @Nullable List<String> jvmArguments)
-
-
Method Details
-
parserRequest
Description copied from interface:InvokerRequest
The parser request this instance was created from.- Specified by:
parserRequest
in interfaceInvokerRequest
-
cwd
Description copied from interface:InvokerRequest
Returns the current working directory for the Maven execution. This is typically the directory from which Maven was invoked.- Specified by:
cwd
in interfaceInvokerRequest
- Returns:
- the current working directory path
-
installationDirectory
Description copied from interface:InvokerRequest
Returns the Maven installation directory. This is usually set by the Maven launcher script using the "maven.home" system property.- Specified by:
installationDirectory
in interfaceInvokerRequest
- Returns:
- the Maven installation directory path
-
userHomeDirectory
Description copied from interface:InvokerRequest
Returns the user's home directory. This is typically obtained from the "user.home" system property.- Specified by:
userHomeDirectory
in interfaceInvokerRequest
- Returns:
- the user's home directory path
-
jvmArguments
Description copied from interface:InvokerRequest
Returns the list of extra JVM arguments to be passed to the forked process. These arguments allow for customization of the JVM environment in which tool will run. This property is used ONLY by executors and invokers that spawn a new JVM.- Specified by:
jvmArguments
in interfaceInvokerRequest
- Returns:
- an Optional containing the list of extra JVM arguments, or empty if not specified
-
userProperties
Description copied from interface:InvokerRequest
Returns a map of user-defined properties for the Maven execution. These properties can be set using the -D command-line option.- Specified by:
userProperties
in interfaceInvokerRequest
- Returns:
- an unmodifiable map of user properties
-
systemProperties
Description copied from interface:InvokerRequest
Returns a map of system properties for the Maven execution. These include both Java system properties and Maven-specific system properties.- Specified by:
systemProperties
in interfaceInvokerRequest
- Returns:
- an unmodifiable map of system properties
-
topDirectory
Description copied from interface:InvokerRequest
Returns the top-level directory of the Maven invocation. This is typically the directory containing the POM file being executed.- Specified by:
topDirectory
in interfaceInvokerRequest
- Returns:
- the top-level directory path
-
rootDirectory
Description copied from interface:InvokerRequest
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).- Specified by:
rootDirectory
in interfaceInvokerRequest
- Returns:
- the root directory path, if present
-
in
Description copied from interface:InvokerRequest
Returns the input stream for the Maven execution, if running in embedded mode.- Specified by:
in
in interfaceInvokerRequest
- Returns:
- an
Optional
containing the input stream, or empty if not applicable
-
out
Description copied from interface:InvokerRequest
Returns the output stream for the Maven execution, if running in embedded mode.- Specified by:
out
in interfaceInvokerRequest
- Returns:
- an
Optional
containing the output stream, or empty if not applicable
-
err
Description copied from interface:InvokerRequest
Returns the error stream for the Maven execution, if running in embedded mode.- Specified by:
err
in interfaceInvokerRequest
- Returns:
- an
Optional
containing the error stream, or empty if not applicable
-
coreExtensions
Description copied from interface:InvokerRequest
Returns a list of core extensions, if configured in the .mvn/extensions.xml file.- Specified by:
coreExtensions
in interfaceInvokerRequest
- Returns:
- an
Optional
containing the list of core extensions, or empty if not configured
-