Julian Schilling created CLI-303:
------------------------------------
Summary: 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
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)