[ 
https://issues.apache.org/jira/browse/MNG-8423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904913#comment-17904913
 ] 

Tamas Cservenak edited comment on MNG-8423 at 12/11/24 8:44 PM:
----------------------------------------------------------------

{noformat}
[cstamas@angeleyes ~]$ mvnenc -h

usage: mvnenc [options] [goal]

Options:
 -B,--batch-mode                  Run in non-interactive mode. Alias for 
--non-interactive (kept for backwards compatability)
    --color <arg>                 Defines the color mode of the output. 
Supported are 'auto', 'always', 'never'.
 -D <arg>                         Define a user property
    --debug                       Launch the JVM in debug mode (script option).
 -e,--errors                      Produce execution error messages
    --enc                         Launch the Maven Encryption tool (script 
option).
 -f,--force                       Should overwrite without asking any 
configuration?
    --force-interactive           Run in interactive mode. Overrides, if 
applicable, the CI environment variable and --non-interactive/--batch-mode 
options
 -fos,--fail-on-severity <arg>    Configure which severity of logging should 
cause the build to fail
 -gs,--global-settings <arg>      <deprecated> Alternate path for the global 
settings file.
 -gt,--global-toolchains <arg>    <deprecated> Alternate path for the global 
toolchains file.
 -h,--help                        Display help information
 -is,--install-settings <arg>     Alternate path for the installation settings 
file
 -it,--install-toolchains <arg>   Alternate path for the installation 
toolchains file
 -l,--log-file <arg>              Log file where all build output will go 
(disables output color)
    --non-interactive             Run in non-interactive mode. Alias for 
--batch-mode
 -ps,--project-settings <arg>     Alternate path for the project settings file
 -q,--quiet                       Quiet output - only show errors
    --raw-streams                 Do not decorate standard output and error 
streams
 -s,--settings <arg>              Alternate path for the user settings file
 -t,--toolchains <arg>            Alternate path for the user toolchains file
 -v,--version                     Display version information
 -V,--show-version                Display version information WITHOUT stopping 
build
 -X,--verbose                     Produce execution verbose output
 -y,--yes                         Should imply user answered "yes" to all 
incoming questions?
    --yjp                         Launch the JVM with Yourkit profiler (script 
option).
[cstamas@angeleyes ~]$ 
{noformat}

True. the "goals" could be explained. Current goal was to offer "functionally 
equivalent" capabilities as they were on mvn3, plus decrypt (as in mvn3 you 
could not decrypt). And the init and diag are here to help setup. 
Unintuitively, w/o -h this is output:

{noformat}
[cstamas@angeleyes ~]$ mvnenc 
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Pre-Maven 4 legacy encrypted password detected  - configure password 
encryption with the help of mvnenc to be compatible with Maven 4. @ 
/home/cstamas/.m2/settings.xml
[WARNING] 
[ERROR] No goal or multiple goals specified, specify only one goal.
[ERROR] Supported goals are: decrypt, diag, encrypt, init
[ERROR] Use -h to display help.
[cstamas@angeleyes ~]$ 
{noformat}


was (Author: cstamas):
{noformat}
[cstamas@angeleyes ~]$ mvnenc -h

usage: mvnenc [options] [goal]

Options:
 -B,--batch-mode                  Run in non-interactive mode. Alias for 
--non-interactive (kept for backwards compatability)
    --color <arg>                 Defines the color mode of the output. 
Supported are 'auto', 'always', 'never'.
 -D <arg>                         Define a user property
    --debug                       Launch the JVM in debug mode (script option).
 -e,--errors                      Produce execution error messages
    --enc                         Launch the Maven Encryption tool (script 
option).
 -f,--force                       Should overwrite without asking any 
configuration?
    --force-interactive           Run in interactive mode. Overrides, if 
applicable, the CI environment variable and --non-interactive/--batch-mode 
options
 -fos,--fail-on-severity <arg>    Configure which severity of logging should 
cause the build to fail
 -gs,--global-settings <arg>      <deprecated> Alternate path for the global 
settings file.
 -gt,--global-toolchains <arg>    <deprecated> Alternate path for the global 
toolchains file.
 -h,--help                        Display help information
 -is,--install-settings <arg>     Alternate path for the installation settings 
file
 -it,--install-toolchains <arg>   Alternate path for the installation 
toolchains file
 -l,--log-file <arg>              Log file where all build output will go 
(disables output color)
    --non-interactive             Run in non-interactive mode. Alias for 
--batch-mode
 -ps,--project-settings <arg>     Alternate path for the project settings file
 -q,--quiet                       Quiet output - only show errors
    --raw-streams                 Do not decorate standard output and error 
streams
 -s,--settings <arg>              Alternate path for the user settings file
 -t,--toolchains <arg>            Alternate path for the user toolchains file
 -v,--version                     Display version information
 -V,--show-version                Display version information WITHOUT stopping 
build
 -X,--verbose                     Produce execution verbose output
 -y,--yes                         Should imply user answered "yes" to all 
incoming questions?
    --yjp                         Launch the JVM with Yourkit profiler (script 
option).
[cstamas@angeleyes ~]$ 
{noformat}

True. the "goals" could be explained. Current goal was to offer "functionally 
equivalent" capabilities as they were on mvn3, plus decrypt (as in mvn3 you 
could not decrypt). And the init and diag are here to help setup.

> mvnenc --enc has no help
> ------------------------
>
>                 Key: MNG-8423
>                 URL: https://issues.apache.org/jira/browse/MNG-8423
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 4.0.0-rc-1
>            Reporter: James Nord
>            Priority: Minor
>
> the options to `mvnenv --enc` are undocumented in the CLI.
>  
> h3. steps to reproduce
>  * run {{mvnenc}} to work out what you need to do to setup password encrption
>  * note you are prompted to run {{mvnenc -h}} to get help as the options are 
> not correct
>  * inspect the help
>  * note that {{--enc}} is listed but sub options are not
>  * run `mvnenc --enc -h` to try and get more info
> h3. Expected results
>  * you get some more help about the sepcific options to mvn --enc
> h3. Actual results
>  * you get the generic help page
> h4. Notes
> {{mvnenc.cmd -enc}} gives you some goals (?!) to run and tells you to run -h. 
>  but I have to infer what these goals do 
> the same also applies for the goals... eg `mvnenc --enc init` will fail when 
> run again and then reveal the existance of the `-force` flag which is not 
> discoverable by other means



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to