Package org.apache.maven.api.cli
Class ParserRequest.Builder.ParserRequestImpl
java.lang.Object
org.apache.maven.api.cli.ParserRequest.Builder.ParserRequestImpl
- All Implemented Interfaces:
ParserRequest
- Enclosing class:
ParserRequest.Builder
private static class ParserRequest.Builder.ParserRequestImpl
extends Object
implements ParserRequest
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.api.cli.ParserRequest
ParserRequest.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final String
private final Path
private final OutputStream
private final InputStream
private final Logger
private final Lookup
private final Path
private final MessageBuilderFactory
private final OutputStream
private final Path
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ParserRequestImpl
(String command, String commandName, List<String> args, Logger logger, MessageBuilderFactory messageBuilderFactory, Lookup lookup, Path cwd, Path mavenHome, Path userHome, InputStream in, OutputStream out, OutputStream err) -
Method Summary
Modifier and TypeMethodDescriptionargs()
Returns the command-line arguments to be parsed.command()
Returns the Maven command to be executed.Returns the Maven command name (ie "Maven").cwd()
Returns the current working directory for the Maven execution.err()
Returns the error stream to be used for the Maven execution.in()
Returns the input stream to be used for the Maven execution.logger()
Returns the logger to be used during the parsing process.lookup()
Per-requestLookup
for customization.Returns the Maven home directory.Returns the factory for creating message builders.out()
Returns the output stream to be used for the Maven execution.userHome()
Returns the user's home directory.
-
Field Details
-
command
-
commandName
-
logger
-
messageBuilderFactory
-
args
-
lookup
-
cwd
-
mavenHome
-
userHome
-
in
-
out
-
err
-
-
Constructor Details
-
ParserRequestImpl
private ParserRequestImpl(String command, String commandName, List<String> args, Logger logger, MessageBuilderFactory messageBuilderFactory, Lookup lookup, Path cwd, Path mavenHome, Path userHome, InputStream in, OutputStream out, OutputStream err)
-
-
Method Details
-
command
Description copied from interface:ParserRequest
Returns the Maven command to be executed. This command is used in some invokers (ie forked) but also to present help to user.- Specified by:
command
in interfaceParserRequest
- Returns:
- the command string
-
commandName
Description copied from interface:ParserRequest
Returns the Maven command name (ie "Maven"). This string is used in some invokers to complete error messages.- Specified by:
commandName
in interfaceParserRequest
- Returns:
- the command (human) name
-
logger
Description copied from interface:ParserRequest
Returns the logger to be used during the parsing process.- Specified by:
logger
in interfaceParserRequest
- Returns:
- the logger instance
-
messageBuilderFactory
Description copied from interface:ParserRequest
Returns the factory for creating message builders.- Specified by:
messageBuilderFactory
in interfaceParserRequest
- Returns:
- the message builder factory
-
args
Description copied from interface:ParserRequest
Returns the command-line arguments to be parsed.- Specified by:
args
in interfaceParserRequest
- Returns:
- a list of argument strings
-
lookup
Description copied from interface:ParserRequest
Per-requestLookup
for customization.- Specified by:
lookup
in interfaceParserRequest
- Returns:
- a lookup possibly with custom components
-
cwd
Description copied from interface:ParserRequest
Returns the current working directory for the Maven execution. If not explicitly set, this value will be detected during parsing.- Specified by:
cwd
in interfaceParserRequest
- Returns:
- the current working directory path, or null if not set
-
mavenHome
Description copied from interface:ParserRequest
Returns the Maven home directory. If not explicitly set, this value will be detected during parsing.- Specified by:
mavenHome
in interfaceParserRequest
- Returns:
- the Maven home directory path, or null if not set
-
userHome
Description copied from interface:ParserRequest
Returns the user's home directory. If not explicitly set, this value will be detected during parsing.- Specified by:
userHome
in interfaceParserRequest
- Returns:
- the user's home directory path, or null if not set
-
in
Description copied from interface:ParserRequest
Returns the input stream to be used for the Maven execution. If not set, System.in will be used by default.- Specified by:
in
in interfaceParserRequest
- Returns:
- the input stream, or null if not set
-
out
Description copied from interface:ParserRequest
Returns the output stream to be used for the Maven execution. If not set, System.out will be used by default.- Specified by:
out
in interfaceParserRequest
- Returns:
- the output stream, or null if not set
-
err
Description copied from interface:ParserRequest
Returns the error stream to be used for the Maven execution. If not set, System.err will be used by default.- Specified by:
err
in interfaceParserRequest
- Returns:
- the error stream, or null if not set
-