Class CommonsCliOptions
java.lang.Object
org.apache.maven.cling.invoker.CommonsCliOptions
- All Implemented Interfaces:
Options
- Direct Known Subclasses:
CommonsCliEncryptOptions
,CommonsCliMavenOptions
,CommonsCliShellOptions
,CommonsCliUpgradeOptions
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CommonsCliOptions.CLIManager
protected final org.apache.commons.cli.CommandLine
protected final String
Fields inherited from interface org.apache.maven.api.cli.Options
SOURCE_CLI
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommonsCliOptions
(String source, CommonsCliOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine) -
Method Summary
Modifier and TypeMethodDescriptionReturns the path to an alternate installation settings file.Returns the path to an alternate installation toolchains file.Returns the path to an alternate project settings file.Returns the path to an alternate user settings file.Returns the path to an alternate user toolchains file.color()
Returns the color setting for console output.protected CommonsCliOptions
copy
(String source, CommonsCliOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine) void
displayHelp
(ParserRequest request, Consumer<String> printStream) Displays help information for these options.Returns the severity level at which the build should fail.Indicates whether to force interactive mode.help()
Indicates whether to show help information.final Options
interpolate
(UnaryOperator<String> callback) Returns a new instance ofOptions
with values interpolated using the given properties.logFile()
Returns the path to the log file.Indicates whether to run in non-interactive mode.offline()
Indicates whether Maven should operate in offline mode.static CommonsCliOptions
quiet()
Indicates whether to run in quiet mode.Returns whether raw streams should be logged.Indicates whether to show error stack traces.Indicates whether to show the version information.Indicates whether to show the version information and exit.source()
Returns a simple designator of the options source, such as "cli", "maven.conf", etc.Returns the user-defined properties for the Maven execution.verbose()
Indicates whether to run in verbose mode.void
warnAboutDeprecatedOptions
(ParserRequest request, Consumer<String> printWriter) Emits warning messages if deprecated options are used.
-
Field Details
-
source
-
cliManager
-
commandLine
protected final org.apache.commons.cli.CommandLine commandLine
-
-
Constructor Details
-
CommonsCliOptions
protected CommonsCliOptions(String source, CommonsCliOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine)
-
-
Method Details
-
parse
public static CommonsCliOptions parse(String source, String[] args) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
source
-
userProperties
-
showVersionAndExit
-
showVersion
-
quiet
-
verbose
-
showErrors
-
failOnSeverity
-
nonInteractive
-
forceInteractive
-
altUserSettings
-
altProjectSettings
-
altInstallationSettings
-
altUserToolchains
-
altInstallationToolchains
-
logFile
-
rawStreams
Description copied from interface:Options
Returns whether raw streams should be logged.- Specified by:
rawStreams
in interfaceOptions
- Returns:
- a boolean indicating whether raw streams should be logged
-
color
-
offline
-
help
-
warnAboutDeprecatedOptions
Description copied from interface:Options
Emits warning messages if deprecated options are used.- Specified by:
warnAboutDeprecatedOptions
in interfaceOptions
- Parameters:
printWriter
- the string consumer to use for output
-
interpolate
Description copied from interface:Options
Returns a new instance ofOptions
with values interpolated using the given properties.- Specified by:
interpolate
in interfaceOptions
- Parameters:
callback
- the callback to use for interpolation- Returns:
- a new
Options
instance with interpolated values
-
copy
protected CommonsCliOptions copy(String source, CommonsCliOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine) -
displayHelp
Description copied from interface:Options
Displays help information for these options.- Specified by:
displayHelp
in interfaceOptions
- Parameters:
printStream
- the string consumer to use for output
-