Apache Commons logo Commons CLI

Commons CLI Release Notes

Release History

Version Date Description
1.5 tba tba
1.4 2017-03-09 New features and bug fixes
1.3.1 2015-06-17 Bug fix release for 1.3
1.3 2015-05-09 This is a feature and maintenance bug fix release.
1.2 2009-03-19 This is a maintenance release containing bug fixes.
1.1 2007-07-08 This is a maintenance release containing bug fixes.
1.0 2002-11-06 Initial release

Release 1.5 – tba

Type Changes By
Add CommandLine.getXXX and CommandLine.hasXXX should accept an Option as a parameter. Fixes CLI-271. Thanks to Christoph Läubrich. britter
Add Adjust access-modifier of checkRequiredOptions() to protected. Fixes CLI-276. Thanks to Jason Dillon. ggregory

Release 1.4 – 2017-03-09

Type Changes By
Add Introduce CommandLine.Builder. Fixes CLI-269. rfscholte
Fix Optional argument picking up next regular option as its argument. Fixes CLI-265. Thanks to Martin Sandiford. britter
Add Add an addRequiredOption method to Options. Fixes CLI-267. Thanks to Ricardo Ribeiro. britter
Fix HelpFormatter.setOptionComparator(null) doesn't display the values in inserted order. Fixes CLI-266. Thanks to Ravi Teja. britter

Release 1.3.1 – 2015-06-17

Type Changes By
Fix LongOpt falsely detected as ambiguous. Fixes CLI-252. Thanks to Simon Harrer. britter

Release 1.3 – 2015-05-09

Type Changes By
Fix Fixed broken Javadoc links on Introduction page. Fixes CLI-248. djones
Fix Fixed code example in javadoc of "Option#Builder#valueSeparator(char)". Fixes CLI-234. Thanks to Greg Thomas. tn
Fix Clarified behavior of "OptionValidator#validateOption(String)" in case of null input. Fixes CLI-241. Thanks to Beluga Behr. tn
Update Small cleanup of Option class. Fixes CLI-240. Thanks to Beluga Behr. tn
Update Removed DoubleCheckedLocking test from checkstyle configuration. Fixes CLI-231. Thanks to Duncan Jones. tn
Update Options.getRequiredOptions() now returns an unmodifiable list. Fixes CLI-230. tn
Add Added new fluent API to create Option instances via builder class Option.Builder. This replaces the now deprecated OptionBuilder. Fixes CLI-224. Thanks to Duncan Jones, Brian Blount. tn
Update Clarify javadoc for CommandLine.getOptionValue() that the first specified argument will be returned. Fixes CLI-218. Thanks to Sven. tn
Add Added new method Options.addOption(String, String). Fixes CLI-214. Thanks to Alexandru Mocanu. tn
Update Changed unit tests to junit 4 annotation style. Fixes CLI-227. Thanks to Duncan Jones. tn
Fix Default options will now work correctly with required options that are missing. Fixes CLI-202. ebourg
Fix Default options will now work correctly together with option groups. Fixes CLI-203. ebourg
Update The javadoc of OptionBuilder now states that the class is not thread-safe. Fixes CLI-209. Thanks to Thomas Herre. ebourg
Add HelpFormatter now supports setting the displayed separator of long options. Fixes CLI-169. Thanks to J. Lewis Muir. ebourg
Update Improve description of parameter "stopAtNonOption" in method CommandLine.parse(Options, String[], boolean). Fixes CLI-197. Thanks to Anders Larsson. ebourg
Fix Passing default values for not defined options to a parser will now trigger a ParseException instead of a NullPointerException. Fixes CLI-204. ebourg
Fix HelpFormatter.setArgName(String) now correctly sets the argument name. Fixes CLI-205. ebourg
Fix Default properties provided as input to the Parser.parse() methods are now correctly processed. Fixes CLI-201. ebourg
Fix CommandLine.getParsedOptionValue() now returns a String object if no option type has been explicitly set. Fixes CLI-215. Thanks to Manuel Müller. ebourg
Update Fixed typo in javadoc of class CommandLine. Fixes CLI-200. Thanks to Gerard Weatherby. ggregory
Update Source code now uses generic types instead of raw types where possible. Fixes CLI-223. Thanks to Gerard Weatherby. ebourg
Update Corrected javadoc for return type of MissingOptionException.getMissingOptions(). Fixes CLI-220. Thanks to Joe Casadonte. ebourg
Fix HelpFormatter now prints command-line options in the same order as they have been added. Fixes CLI-212. Thanks to Per Cederberg. ebourg
Fix Standard help text now shows mandatory arguments also for the first option. Fixes CLI-186. Thanks to Kristoff Kiefer. ebourg
Fix HelpFormatter does not strip anymore leading whitespace in the footer text. Fixes CLI-207. Thanks to Uri Moszkowicz. ebourg
Fix Strip quotes contained in argument values only if there is exactly one at the beginning and one at the end. Fixes CLI-185. Thanks to Einar M R Rosenvinge. ebourg
Fix Negative numerical arguments take precedence over numerical options (only supported by the new DefaultParser). Fixes CLI-184. ebourg
Fix Fix possible StringIndexOutOfBoundsException in HelpFormatter. Fixes CLI-193. Thanks to Travis McLeskey. ebourg
Add A new parser is available: DefaultParser. It combines the features of the GnuParser and the PosixParser. It also provides additional features like partial matching for the long options, and long options without separator (i.e like the JVM memory settings: -Xmx512m). This new parser deprecates the previous ones. Fixes CLI-161,CLI-167,CLI-181. ebourg
Fix OptionGroups no longer throw an AlreadySelectedException when reused for several parsings. Fixes CLI-183. ebourg
Fix OptionGroup now selects properly an option with no short name. Fixes CLI-182. ebourg
Add PosixParser now supports partial long options (--ver instead of --version). Fixes CLI-160. ebourg

Release 1.2 – 2009-03-19

Type Changes By
Fix OptionBuilder is now reseted if an IllegalArgumentException occurs in create(). Fixes CLI-177. joehni
Remove Ant build system removed. bayard
Fix Incomplete usage documentation about Java property option. Fixes CLI-154. ebourg
Fix TypeHandler prints messages to stderr. Fixes CLI-170. bayard
Fix Infinite loop in the wrapping code of HelpFormatter. Fixes CLI-162. bayard
Fix Fixing some minor javadoc issues. sgoeschl
Fix The number of arguments defined for an option specifies the arguments per occurrence of the option and not for all occurrences. This was a major regression in CLI 1.1 which prevented the use of repeated options. Fixes CLI-137. ebourg
Add Added a getOptionProperties() method in the CommandLine class to retrieve easily the key/value pairs specified with options like -Dkey1=value1 -Dkey2=value2. ebourg
Update GnuParser now supports long options with an '=' sign (ie. --foo=bar and -foo=bar). Fixes CLI-157. ebourg
Fix PosixParser no longer ignores unrecognized short options. Fixes CLI-164. ebourg
Fix PosixParser no longer stops the bursting process of a token if stopAtNonOption is enabled and a non option character is encountered. Fixes CLI-163. ebourg
Fix PosixParser no longer keeps processing the tokens after an unrecognized long option when stopAtNonOption is enabled. Fixes CLI-165. ebourg
Fix Required options are properly checked if an Options instance is used twice to parse a command line. Fixes CLI-156. ebourg
Update The ordering of options can be defined in help messages. Fixes CLI-155. bayard
Fix The line wrapping in HelpFormatter now works properly. This caused CLI-162, and thus there was a feature change for the HelpFormatter in that it is strict on width now rather than what seemed to be lenience before. Text without whitespace will be cut off to fit in the spacing, and an IllegalStateException will be thrown if it is impossible to output the information due to spacing constraints. Fixes CLI-151. Thanks to Dan Armbrust. bayard
Fix The message of MissingOptionException has been improved. Fixes CLI-149. bayard
Update The exceptions have been enhanced with methods to retrieve easily the related options. Fixes CLI-86. ebourg
Fix Option.toString() now reports arguments properly. Fixes CLI-141. Thanks to Henning Schmiedehausen, Bjorn Townsend. bayard
Update The Parser class has been changed to be more easily extendable. Fixes CLI-142. Thanks to Henning Schmiedehausen. bayard
Update The following classes are now serializable: Option, OptionGroup, CommandLine and Options. Fixes CLI-140. bayard
Remove OptionValidator is no longer public, its methods were all private. ebourg

Release 1.1 – 2007-07-08

Type Changes By
Fix Wrong usage summary. Fixes CLI-2.
Fix Dependecy on commons-lang-2.0 but commons-lang-1.0 is obtained. Fixes CLI-5.
Fix Line separator as first char for helpformatter (footer) throws exception. Fixes CLI-8.
Fix CommandLine.getOptionValue() behaves contrary to docs. Fixes CLI-13.
Fix clone method in Option should use super.clone(). Fixes CLI-21.
Fix Passing properties in Parser does not work for options with a single argument. Fixes CLI-23.
Fix Only long options without short option seems to be noticed. Fixes CLI-26.
Fix Infinite Loop in Command-Line processing. Fixes CLI-28.
Fix Options should not be able to be added more than once. Fixes CLI-29.
Fix HelpFormatter doesn't sort options properly. Fixes CLI-35.
Fix HelpFormatter doesn't function correctly for options with only LongOpt. Fixes CLI-38.
Fix Document enhancement. Fixes CLI-44.
Fix Documentation errors. Fixes CLI-45.
Fix Parameter value "-something" misinterpreted as a parameter. Fixes CLI-51.
Fix clone() method doesn't fully clone contents. Fixes CLI-56.
Fix No Javadoc for HelpFormatter!. Fixes CLI-59.
Fix Parser breaks up command line parms into single characters. Fixes CLI-65.
Fix Missing arguments in HelpFormatter.renderOptions(..). Fixes CLI-67.
Fix Error parsing option arguments. Fixes CLI-69.
Fix A weakness of parser. Fixes CLI-71.
Add Setting description of a Option. Fixes CLI-78.
Fix CLI_1_BRANCH build.xml doesn't work. Fixes CLI-129.
Fix Remove the Commons Lang dependency. Fixes CLI-130.
Fix Options class returns options in random order. Fixes CLI-131.
Fix MissingOptionException should contain a useful error message. Fixes CLI-132.
Fix NullPointerException in Util.stripLeadingHyphens when passed a null argument. Fixes CLI-133.
Fix 1.1 is not backwards compatible because it adds methods to the CommandLineParser interface. Fixes CLI-134.
Fix Backwards compatibility between 1.1 and 1.0 broken due to Option.addValue removal. Fixes CLI-135.

Release 1.0 – 2002-11-06

No changes in this release.