[ 
https://issues.apache.org/jira/browse/CLI-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Schilling updated CLI-303:
---------------------------------
    Description: 
The [Usage Scenarios|http://commons.apache.org/proper/commons-cli/usage.html] 
describe how to add argument options like this:
{code:java}
Option logfile   = OptionBuilder.withArgName( "file" )
                                .hasArg()
                                .withDescription(  "use given file for log" )
                                .create( "logfile" );
{code}
OptionBuilder has been deprecated. From what I can tell, the new way to do it 
is this:
{code:java}
  Option logfile = Option.builder("logfile")
      .argName("file")
      .hasArg()
      .desc("use given file for log")
      .build();{code}

  was:
The "[Usage 
Scenarios|[http://commons.apache.org/proper/commons-cli/usage.html]]"; describe 
how to add argument options like this:
{code:java}
Option logfile   = OptionBuilder.withArgName( "file" )
                                .hasArg()
                                .withDescription(  "use given file for log" )
                                .create( "logfile" );
{code}
OptionBuilder has been deprecated. From what I can tell, the new way to do it 
is this:
{code:java}
  Option logfile = Option.builder("logfile")
      .argName("file")
      .hasArg()
      .desc("use given file for log")
      .build();{code}


> Doc: "Usage Scenarios" refers to deprecated methods
> ---------------------------------------------------
>
>                 Key: CLI-303
>                 URL: https://issues.apache.org/jira/browse/CLI-303
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.3.1
>            Reporter: Julian Schilling
>            Priority: Minor
>              Labels: documentation, easyfix
>
> The [Usage Scenarios|http://commons.apache.org/proper/commons-cli/usage.html] 
> describe how to add argument options like this:
> {code:java}
> Option logfile   = OptionBuilder.withArgName( "file" )
>                                 .hasArg()
>                                 .withDescription(  "use given file for log" )
>                                 .create( "logfile" );
> {code}
> OptionBuilder has been deprecated. From what I can tell, the new way to do it 
> is this:
> {code:java}
>   Option logfile = Option.builder("logfile")
>       .argName("file")
>       .hasArg()
>       .desc("use given file for log")
>       .build();{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to