Class CommonsCliEncryptOptions
java.lang.Object
org.apache.maven.cling.invoker.CommonsCliOptions
org.apache.maven.cling.invoker.mvnenc.CommonsCliEncryptOptions
- All Implemented Interfaces:
EncryptOptions
,Options
Implementation of
EncryptOptions
(base + mvnenc).-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.maven.cling.invoker.CommonsCliOptions
cliManager, commandLine, source
Fields inherited from interface org.apache.maven.api.cli.Options
SOURCE_CLI
-
Constructor Summary
ModifierConstructorDescriptionprotected
CommonsCliEncryptOptions
(String source, CommonsCliEncryptOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine) -
Method Summary
Modifier and TypeMethodDescriptionvoid
displayHelp
(ParserRequest request, Consumer<String> printStream) Displays help information for these options.force()
Should the operation be forced (ie overwrite existing config, if any).goals()
Returns the list of encryption goals to be executed.interpolate
(Collection<Map<String, String>> properties) Returns a new instance of EncryptOptions with values interpolated using the given properties.static CommonsCliEncryptOptions
yes()
Should imply "yes" to all questions.Methods inherited from class org.apache.maven.cling.invoker.CommonsCliOptions
altInstallationSettings, altInstallationToolchains, altProjectSettings, altUserSettings, altUserToolchains, color, failOnSeverity, forceInteractive, help, logFile, nonInteractive, quiet, rawStreams, showErrors, showVersion, showVersionAndExit, source, userProperties, verbose, warnAboutDeprecatedOptions
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.Options
altInstallationSettings, altInstallationToolchains, altProjectSettings, altUserSettings, altUserToolchains, color, failOnSeverity, forceInteractive, help, logFile, nonInteractive, quiet, rawStreams, showErrors, showVersion, showVersionAndExit, source, userProperties, verbose, warnAboutDeprecatedOptions
-
Constructor Details
-
CommonsCliEncryptOptions
protected CommonsCliEncryptOptions(String source, CommonsCliEncryptOptions.CLIManager cliManager, org.apache.commons.cli.CommandLine commandLine)
-
-
Method Details
-
parse
public static CommonsCliEncryptOptions parse(String[] args) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
force
Description copied from interface:EncryptOptions
Should the operation be forced (ie overwrite existing config, if any).- Specified by:
force
in interfaceEncryptOptions
- Returns:
- an
Optional
containing the boolean valuetrue
if specified, or empty
-
yes
Description copied from interface:EncryptOptions
Should imply "yes" to all questions.- Specified by:
yes
in interfaceEncryptOptions
- Returns:
- an
Optional
containing the boolean valuetrue
if specified, or empty
-
goals
Description copied from interface:EncryptOptions
Returns the list of encryption goals to be executed. These goals can include operations like "init", "add-server", "delete-server", etc.- Specified by:
goals
in interfaceEncryptOptions
- Returns:
- an
Optional
containing the list of goals, or empty if not specified
-
interpolate
Description copied from interface:EncryptOptions
Returns a new instance of EncryptOptions with values interpolated using the given properties.- Specified by:
interpolate
in interfaceEncryptOptions
- Specified by:
interpolate
in interfaceOptions
- Parameters:
properties
- a collection of property maps to use for interpolation- Returns:
- a new EncryptOptions instance with interpolated values
-
displayHelp
Description copied from interface:Options
Displays help information for these options.- Specified by:
displayHelp
in interfaceOptions
- Overrides:
displayHelp
in classCommonsCliOptions
printStream
- the string consumer to use for output
-