11 Apache Commons CLI
2- Version 1.3.1
2+ Version 1.4
33 Release Notes
44
55
@@ -9,13 +9,33 @@ This document contains the release notes for this version of the Commons CLI
99package. Commons CLI provides a simple API for working with the command line
1010arguments and options.
1111
12- Commons CLI 1.3.1 is a bug fix release and binary compatible with the
12+ Commons CLI 1.4 is a feature release and binary compatible with the
1313previous versions, except for the OptionValidator class that is no longer public
14- (change introduced in v1.2). Commons CLI 1.3.1 at least requires Java 5.0.
14+ (change introduced in v1.2). Commons CLI 1.4 at least requires Java 5.0.
1515
16- More information can be found on the project site at
16+ More information can be found on the project site at
1717http://commons.apache.org/cli.
1818
19+
20+ NEW FEATURES
21+ ============
22+
23+ o CLI-269: Introduce CommandLine.Builder
24+ o CLI-267: Add an addRequiredOption method to Options.
25+ Thanks to Ricardo Ribeiro.
26+
27+
28+ BUG FIXES
29+ =========
30+
31+ o CLI-265: Optional argument picking up next regular option as its argument.
32+ Thanks to Martin Sandiford.
33+ o CLI-266: HelpFormatter.setOptionComparator(null) doesn't display the values
34+ in inserted order. Thanks to Ravi Teja.
35+
36+
37+ Release Notes for version 1.3.1
38+
1939BUG FIXES
2040=========
2141
@@ -36,21 +56,21 @@ deprecates the previous ones.
3656DEPRECATIONS
3757============
3858
39- o org.apache.commons.cli.BasicParser
59+ o org.apache.commons.cli.BasicParser
4060 replaced by org.apache.commons.cli.DefaultParser
4161
42- o org.apache.commons.cli.GnuParser
62+ o org.apache.commons.cli.GnuParser
4363 replaced by org.apache.commons.cli.DefaultParser
4464
45- o org.apache.commons.cli.OptionBuilder
65+ o org.apache.commons.cli.OptionBuilder
4666 replaced by org.apache.commons.cli.Option.builder()
4767 org.apache.commons.cli.Option.builder(String)
4868 org.apache.commons.cli.Option.Builder
4969
50- o org.apache.commons.cli.Parser
70+ o org.apache.commons.cli.Parser
5171 replaced by org.apache.commons.cli.DefaultParser
5272
53- o org.apache.commons.cli.PosixParser
73+ o org.apache.commons.cli.PosixParser
5474 replaced by org.apache.commons.cli.DefaultParser
5575
5676
@@ -65,9 +85,9 @@ o CLI-224: Added new fluent API to create Option instances via builder class
6585 Option.Builder. This replaces the now deprecated OptionBuilder.
6686 Thanks to Duncan Jones, Brian Blount.
6787o CLI-160: PosixParser now supports partial long options (--ver instead of
68- --version).
88+ --version).
6989o CLI-169: HelpFormatter now supports setting the displayed separator of long
70- options. Thanks to J. Lewis Muir.
90+ options. Thanks to J. Lewis Muir.
7191o CLI-214: Added new method Options.addOption(String, String). Thanks to
7292 Alexandru Mocanu.
7393
@@ -82,15 +102,15 @@ o CLI-241: Clarified behavior of "OptionValidator#validateOption(String)"
82102 in case of null input. Thanks to Beluga Behr.
83103o CLI-202: Default options will now work correctly with required options that
84104 are missing.
85- o CLI-203: Default options will now work correctly together with option groups.
105+ o CLI-203: Default options will now work correctly together with option groups.
86106o CLI-205: HelpFormatter.setArgName(String) now correctly sets the argument
87107 name.
88108o CLI-204: Passing default values for not defined options to a parser will now
89109 trigger a ParseException instead of a NullPointerException.
90110o CLI-201: Default properties provided as input to the Parser.parse() methods
91111 are now correctly processed.
92112o CLI-215: CommandLine.getParsedOptionValue() now returns a String object if no
93- option type has been explicitly set. Thanks to Manuel Müller.
113+ option type has been explicitly set. Thanks to Manuel Müller.
94114o CLI-212: HelpFormatter now prints command-line options in the same order as
95115 they have been added. Thanks to Per Cederberg.
96116o CLI-186: Standard help text now shows mandatory arguments also for the first
@@ -100,7 +120,7 @@ o CLI-207: HelpFormatter does not strip anymore leading whitespace in the
100120o CLI-185: Strip quotes contained in argument values only if there is exactly
101121 one at the beginning and one at the end. Thanks to
102122 Einar M. R. Rosenvinge.
103- o CLI-184: Negative numerical arguments take precedence over numerical options.
123+ o CLI-184: Negative numerical arguments take precedence over numerical options.
104124o CLI-193: Fix possible StringIndexOutOfBoundsException in HelpFormatter.
105125 Thanks to Travis McLeskey.
106126o CLI-183: OptionGroups no longer throw an AlreadySelectedException when reused
@@ -112,17 +132,17 @@ CHANGES
112132=======
113133
114134o CLI-240: Small cleanup of Option class. Thanks to Beluga Behr.
115- o CLI-230: Options.getRequiredOptions() now returns an unmodifiable list.
135+ o CLI-230: Options.getRequiredOptions() now returns an unmodifiable list.
116136o CLI-218: Clarify javadoc for CommandLine.getOptionValue() that the first
117- specified argument will be returned. Thanks to Sven.
137+ specified argument will be returned. Thanks to Sven.
118138o CLI-227: Changed unit tests to junit 4 annotation style. Thanks to
119- Duncan Jones.
139+ Duncan Jones.
120140o CLI-209: The javadoc of OptionBuilder now states that the class is not
121- thread-safe. Thanks to Thomas Herre.
141+ thread-safe. Thanks to Thomas Herre.
122142o CLI-200: Fixed typo in javadoc of class CommandLine. Thanks to
123- Gerard Weatherby.
143+ Gerard Weatherby.
124144o CLI-223: Source code now uses generic types instead of raw types where
125- possible. Thanks to Gerard Weatherby.
145+ possible. Thanks to Gerard Weatherby.
126146o CLI-220 Corrected javadoc for return type of
127147 MissingOptionException.getMissingOptions(). Thanks to Joe Casadonte.
128148o CLI-197: Improve description of parameter "stopAtNonOption" in method
@@ -140,7 +160,7 @@ NEW FEATURES
140160o -- : The method getOptionProperties() in the CommandLine class was added
141161 to retrieve easily the key/value pairs specified with options like
142162 -Dkey1=value1 -Dkey2=value2.
143- o CLI-157: GnuParser now supports long options with an '=' sign
163+ o CLI-157: GnuParser now supports long options with an '=' sign
144164 (ie. --foo=bar and -foo=bar)
145165o CLI-155: The ordering of options can be defined in help messages.
146166
@@ -154,7 +174,7 @@ o CLI-164: PosixParser no longer ignores unrecognized short options.
154174o CLI-163: PosixParser no longer stops the bursting process of a token if
155175 stopAtNonOption is enabled and a non option character is
156176 encountered.
157- o CLI-165: PosixParser no longer keeps processing the tokens after an
177+ o CLI-165: PosixParser no longer keeps processing the tokens after an
158178 unrecognized long option when stopAtNonOption is enabled.
159179o CLI-156: Required options are properly checked if an Options instance is used
160180 twice to parse a command line.
@@ -179,31 +199,31 @@ o -- : OptionValidator is no longer public, its methods were all private.
179199NEW FEATURES
180200============
181201
182- o CLI-78: Setting description of a Option.
202+ o CLI-78: Setting description of a Option.
183203
184204CHANGES
185205=======
186206
187- o CLI-2: Wrong usage summary.
188- o CLI-5: Dependecy on commons-lang-2.0 but commons-lang-1.0 is obtained.
207+ o CLI-2: Wrong usage summary.
208+ o CLI-5: Dependecy on commons-lang-2.0 but commons-lang-1.0 is obtained.
189209o CLI-8: Line separator as first char for helpformatter (footer) throws
190- exception.
191- o CLI-13: CommandLine.getOptionValue() behaves contrary to docs.
192- o CLI-21: clone method in Option should use super.clone().
210+ exception.
211+ o CLI-13: CommandLine.getOptionValue() behaves contrary to docs.
212+ o CLI-21: clone method in Option should use super.clone().
193213o CLI-23: Passing properties in Parser does not work for options with a single
194- argument.
195- o CLI-26: Only long options without short option seems to be noticed.
196- o CLI-28: Infinite Loop in Command-Line processing.
197- o CLI-29: Options should not be able to be added more than once.
198- o CLI-35: HelpFormatter doesn't sort options properly.
214+ argument.
215+ o CLI-26: Only long options without short option seems to be noticed.
216+ o CLI-28: Infinite Loop in Command-Line processing.
217+ o CLI-29: Options should not be able to be added more than once.
218+ o CLI-35: HelpFormatter doesn't sort options properly.
199219o CLI-38: HelpFormatter doesn't function correctly for options with only
200- LongOpt.
201- o CLI-44: Document enhancement.
202- o CLI-45: Documentation errors.
203- o CLI-51: Parameter value "-something" misinterpreted as a parameter.
204- o CLI-56: clone() method doesn't fully clone contents.
205- o CLI-59: No Javadoc for HelpFormatter!.
206- o CLI-65: Parser breaks up command line parms into single characters.
220+ LongOpt.
221+ o CLI-44: Document enhancement.
222+ o CLI-45: Documentation errors.
223+ o CLI-51: Parameter value "-something" misinterpreted as a parameter.
224+ o CLI-56: clone() method doesn't fully clone contents.
225+ o CLI-59: No Javadoc for HelpFormatter!.
226+ o CLI-65: Parser breaks up command line parms into single characters.
207227o CLI-67: Missing arguments in HelpFormatter.renderOptions(..).
208228o CLI-69: Error parsing option arguments.
209229o CLI-71: A weakness of parser.
@@ -212,17 +232,17 @@ o CLI-130: Remove the Commons Lang dependency.
212232o CLI-131: Options class returns options in random order.
213233o CLI-132: MissingOptionException should contain a useful error message.
214234o CLI-133: NullPointerException in Util.stripLeadingHyphens when passed a null
215- argument.
235+ argument.
216236o CLI-134: 1.1 is not backwards compatible because it adds methods to the
217- CommandLineParser interface.
237+ CommandLineParser interface.
218238o CLI-135: Backwards compatibility between 1.1 and 1.0 broken due to
219- Option.addValue removal.
239+ Option.addValue removal.
220240
221241
222242Historical list of changes: http://commons.apache.org/cli/changes-report.html
223243
224244For complete information on Commons CLI, including instructions on how to
225- submit bug reports, patches, or suggestions for improvement, see the
245+ submit bug reports, patches, or suggestions for improvement, see the
226246Apache Commons CLI website:
227247
228248http://commons.apache.org/cli/
0 commit comments