Apache Commons CLI Release Notes
Release History
Version |
Date |
Description |
1.9.0 |
2024-08-10 |
This release contains new features and bug fixes and requires Java 8 or above. |
1.8.0 |
2024-05-18 |
This release contains new features and bug fixes and requires Java 8 or above. |
1.7.0 |
2024-04-13 |
This release contains new features and bug fixes and requires Java 8 or above. |
1.6.0 |
2023-10-23 |
This release contains new features and bug fixes and requires Java 8 or above. |
1.5.0 |
2021-10-23 |
This release contains new features and bug fixes and requires Java 7 or above. |
1.4 |
2017-03-09 |
This release contains new features and bug fixes and requires Java 5 or above. |
1.3.1 |
2015-06-17 |
This release contains bug fixes and requires Java 5 or above. |
1.3 |
2015-05-09 |
This release contains new features and bug fixes and requires Java 5 or above.. |
1.2 |
2009-03-19 |
This release contains new features and bug fixes and requires Java 5 or above. |
1.1 |
2007-07-08 |
This is a maintenance release containing bug fixes. |
1.0 |
2002-11-06 |
Initial release |
Release 1.9.0 – 2024-08-10
Type |
Changes |
By |
 |
Add OptionGroup.isSelected(). Thanks to Gary Gregory. |
ggregory |
 |
You can now extend HelpFormatter.Builder. Thanks to Gary Gregory. |
ggregory |
 |
Add 'since' attribute to Option to track when an Option was introduced #292 Thanks to Claude Warren. |
ggregory |
 |
Fix Javadoc pathing #280. Fixes CLI-334. Thanks to Eric Pugh. |
ggregory |
 |
Updated properties documentation #285. Fixes CLI-335. Thanks to Claude Warren. |
ggregory |
 |
Deprecation not always reported #284. Fixes CLI-336. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Replace internal StringBuffer with StringBuilder. Thanks to Gary Gregory. |
ggregory |
 |
Bump org.apache.commons:commons-parent from 70 to 72 #283. Thanks to Gary Gregory, Dependabot. |
ggregory |
Release 1.8.0 – 2024-05-18
Type |
Changes |
By |
 |
Add optional HelpFormatter Function to document Deprecated options #271. Fixes CLI-332. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Add PMD check to default Maven goal. Thanks to Gary Gregory. |
ggregory |
 |
Handle reporting of deprecated options when parameters are not String type. #270. Fixes CLI-331. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Avoid throwing NullPointerException when calling CommandLineParser will null array elements. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Cleanup deprecation issues #272. Thanks to Claude Warren. |
ggregory |
 |
Fix PMD UnnecessaryFullyQualifiedName issues. Thanks to Gary Gregory. |
ggregory |
 |
Bump commons-parent from 69 to 70. Thanks to Gary Gregory. |
ggregory |
Release 1.7.0 – 2024-04-13
Type |
Changes |
By |
 |
Inconsistent behavior in key/value pairs (Java property style). Fixes CLI-312. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Avoid NullPointerException in Util.stripLeadingAndTrailingQuotes(String). Thanks to Gary Gregory. |
ggregory |
 |
Awkward behavior of Option.builder() for multiple optional args. Fixes CLI-320. Thanks to Paul King, Claude Warren. |
ggregory |
 |
Properties from multiple arguments with value separator. #237. Fixes CLI-325. Thanks to Claude Warren. |
ggregory |
 |
Fix for expected textual date values. #244. Fixes CLI-327. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Option.Builder.option("") should throw IllegalArgumentException instead of ArrayIndexOutOfBoundsException. Thanks to Gary Gregory. |
ggregory |
 |
Avoid NullPointerException in CommandLine.getOptionValues(Option|String). Thanks to Gary Gregory. |
ggregory |
 |
Add and use a Converter interface and implementations without using BeanUtils #216. Fixes CLI-321. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Add Maven property project.build.outputTimestamp for build reproducibility. Thanks to Gary Gregory. |
ggregory |
 |
Add '-' as an option char and implemented extensive tests #217. Fixes CLI-322. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Make adding OptionGroups and Options to existing Options easier #230. Fixes CLI-324. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Added Supplier<T> defaults for getParsedOptionValue #229. Fixes CLI-323. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Make Option.getKey() public #239. Fixes CLI-326. Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Add builder factory CommandLine#builder(). Thanks to Claude Warren, Gary Gregory. |
ggregory |
 |
Support "Deprecated" CLI Options #252. Fixes CLI-329. Thanks to Eric Pugh, Gary Gregory. |
ggregory |
 |
Bump commons-parent from 64 to 69 #256. Thanks to Gary Gregory. |
ggregory |
 |
Update the tests to JUnit 5 #238. Thanks to Elric, Gary Gregory. |
ggregory |
 |
Bump tests commons-io:commons-io from 2.16.0 to 2.16.1 #258. Thanks to Dependabot, Gary Gregory. |
ggregory |
Release 1.6.0 – 2023-10-23
Type |
Changes |
By |
 |
Fix SpotBugs Error: Medium: Method intentionally throws RuntimeException. [org.apache.commons.cli.Option] At Option.java:[lines 417-423] THROWS_METHOD_THROWS_RUNTIMEEXCEPTION Thanks to Gary Gregory. |
ggregory |
 |
Fix SpotBugs Error: Medium: Method intentionally throws RuntimeException. [org.apache.commons.cli.Option] At Option.java:[lines 446-450] THROWS_METHOD_THROWS_RUNTIMEEXCEPTION Thanks to Gary Gregory. |
ggregory |
 |
Fix SpotBugs Error: Medium: Method intentionally throws RuntimeException. [org.apache.commons.cli.Option] At Option.java:[lines 474-478] THROWS_METHOD_THROWS_RUNTIMEEXCEPTION Thanks to Gary Gregory. |
ggregory |
 |
Use EMPTY_STRING_ARRAY constant. #102. Thanks to Ken Dombeck. |
ggregory |
 |
Fix site links that are broken #155. Thanks to Arturo Bernal. |
ggregory |
 |
Use Math.max() #111.
Delete unused assignment #112. Thanks to Arturo Bernal. |
ggregory |
 |
[StepSecurity] ci: Harden GitHub Actions #176. Thanks to step-security-bot, Gary Gregory. |
ggregory |
 |
Inconsistent date format in changes report. Fixes CLI-318. Thanks to Alexander Veit, Gary Gregory. |
ggregory |
 |
Fix NPE in CommandLine.resolveOption(String). Fixes CLI-283. Thanks to Dilraj Singh, Gary Gregory. |
ggregory |
 |
CommandLine.addOption(Option) should not allow a null Option. Fixes CLI-283. Thanks to Dilraj Singh, Gary Gregory. |
ggregory |
 |
CommandLine.addArgs(String) should not allow a null String. Fixes CLI-283. Thanks to Gary Gregory. |
ggregory |
 |
Site docs: "Usage Scenarios" refers to deprecated methods. Fixes CLI-303. Thanks to Julian Schilling, Gary Gregory. |
ggregory |
 |
NullPointerException thrown by CommandLineParser.parse(). Fixes CLI-317. Thanks to Philippe Bastiani, Sruteesh Kumar Paramata, Gary Gregory. |
ggregory |
 |
StringIndexOutOfBoundsException thrown by CommandLineParser.parse(). Fixes CLI-313. Thanks to Dominik Stadler, HUNG LU, Sruteesh Kumar Paramata. |
ggregory |
 |
Add github/codeql-action. Thanks to Dependabot, Gary Gregory. |
ggregory |
 |
Bump Java from 7 to 8. Thanks to Gary Gregory. |
ggregory |
 |
Bump actions/cache from 2.1.7 to 3.0.10 #97, #130, #132. Thanks to Dependabot, Gary Gregory. |
ggregory |
 |
Bump actions/checkout from 3 to 3.1.0 #133. Thanks to Gary Gregory, Dependabot. |
ggregory |
 |
Bump actions/setup-java from 2 to 3.6.0 #136. Thanks to Gary Gregory. |
ggregory |
 |
Bump spotbugs from 4.5.3 to 4.7.3 #96, #107, #113, #125, #138. Thanks to Gary Gregory, Dependabot. |
ggregory |
 |
Bump spotbugs-maven-plugin from 4.5.3.0 to 4.7.3.0 #98, #108, #115, #117, #126, #145. Thanks to Dependabot. |
ggregory |
 |
Bump commons-parent from 52 to 64 #100, #128, #151, #158. Thanks to Dependabot, Gary Gregory. |
ggregory |
 |
Bump maven-antrun-plugin from 3.0.0 to 3.1.0 #103. Thanks to Dependabot. |
ggregory |
 |
Bump maven-javadoc-plugin from 3.3.2 to 3.4.1 #105, #120. Thanks to Dependabot. |
ggregory |
 |
Bump maven-pmd-plugin from 3.16.0 to 3.19.0 #110, #124. Thanks to Dependabot. |
ggregory |
 |
Bump jacoco-maven-plugin from 0.8.7 to 0.8.8. Thanks to Gary Gregory. |
ggregory |
 |
Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 #121. Thanks to Gary Gregory. |
ggregory |
 |
Bump japicmp-maven-plugin from 0.15.4 to 0.16.0. Thanks to Gary Gregory. |
ggregory |
 |
Update JUnit 4 to 5 vintage. Thanks to Gary Gregory. |
ggregory |
Release 1.5.0 – 2021-10-23
Type |
Changes |
By |
 |
Fix NPE in DefaultParser.isLongOption(String). Thanks to Gary Gregory. |
ggregory |
 |
@param or @return lines should end with a period in CommandLine.java. Fixes CLI-279. Thanks to Krishna Mohan Rao Kandunoori. |
britter |
 |
Replace deprecated FindBugs with SpotBugs. Thanks to Gary Gregory. |
ggregory |
 |
Replace CLIRR with JApiCmp. Thanks to Gary Gregory. |
ggregory |
 |
Option Javadocs grammar nits #55. Thanks to Elliotte Rusty Harold. |
ggregory |
 |
Minor Improvements #57, #61. Thanks to Arturo Bernal, Gary Gregory. |
ggregory |
 |
Input "test" gets parsed as test, quotes die #58. Fixes CLI-254. Thanks to stoty. |
ggregory |
 |
Allow whitespace-only header and footer #26. Fixes CLI-287. Thanks to MrQubo, Gary Gregory. |
ggregory |
 |
Accommodate toggling partial matching in DefaultParser. Fixes CLI-217. Thanks to Rubin Simons. |
chtompki |
 |
Option parser type EXISTING_FILE_VALUE not check file existing. Fixes CLI-274. Thanks to Béla Schaum. |
britter |
 |
CommandLine.getXXX and CommandLine.hasXXX should accept an Option as a parameter. Fixes CLI-271. Thanks to Christoph Läubrich. |
britter |
 |
Adjust access-modifier of checkRequiredOptions() to protected. Fixes CLI-276. Thanks to Jason Dillon. |
ggregory |
 |
TypeHandler should throw ParseException for an unsupported class. Fixes CLI-282. Thanks to Alex Nordlund. |
ggregory |
 |
Added setter for Builder.option #33. Thanks to Waldemar Sojka, Gary Gregory. |
ggregory |
 |
Add Option unit tests #76. Thanks to Waldemar Sojka, Gary Gregory. |
ggregory |
 |
Update Java from version 5 to 7. Fixes CLI-294. |
ggregory |
 |
Docs: Replace OptionBuilder in usage page #30. Thanks to Mincong Huang. |
ggregory |
 |
Remove deprecated sudo setting. #36. Thanks to dengliming. |
ggregory |
 |
Bump junit:junit from 4.12 to 4.13.2, #53, #60. Thanks to Gary Gregory, Dependabot. |
ggregory |
 |
Bump commons-parent from 48 to 52. Thanks to Dependabot. |
ggregory |
 |
Bump maven-pmd-plugin from 3.12.0 to 3.16.0, #44, #54, #67, #92. Thanks to Dependabot. |
ggregory |
 |
Bump actions/checkout from 2.3.1 to 3 #46, #72, #78, #93. Thanks to Dependabot. |
ggregory |
 |
Bump actions/setup-java from v1.4.2 to v2 #50. Thanks to Dependabot, Gary Gregory. |
ggregory |
 |
Bump maven-antrun-plugin from 1.7 to 3.0.0 #43. Thanks to Dependabot. |
ggregory |
 |
Bump maven-checkstyle-plugin from 2.15 to 3.1.2 #41. Thanks to Gary Gregory. |
ggregory |
 |
Bump checkstyle to 9.3 #68, #86, #90. Thanks to Gary Gregory. |
ggregory |
 |
Bump actions/cache from 2 to 2.1.7 #64, #65, #81. Thanks to Dependabot. |
ggregory |
 |
Bump commons.animal-sniffer.version 1.19 -> 1.20. Thanks to Gary Gregory. |
ggregory |
 |
Bump maven-bundle-plugin 5.1.1 -> 5.1.2. Thanks to Gary Gregory. |
ggregory |
 |
Bump biz.aQute.bndlib.version 5.1.2 -> 6.0.0. Thanks to Gary Gregory. |
ggregory |
 |
Bump spotbugs from 4.4.1 to 4.5.3 #70, #88. Thanks to Dependabot. |
ggregory |
 |
Bump spotbugs-maven-plugin from 4.4.1 to 4.5.3.0 #71, #85, #87. Thanks to Dependabot. |
ggregory |
 |
Bump maven-javadoc-plugin from 3.3.1 to 3.3.2, #91. Thanks to Dependabot. |
ggregory |
Release 1.4 – 2017-03-09
Type |
Changes |
By |
 |
Introduce CommandLine.Builder. Fixes CLI-269. |
rfscholte |
 |
Optional argument picking up next regular option as its argument. Fixes CLI-265. Thanks to Martin Sandiford. |
britter |
 |
Add an addRequiredOption method to Options. Fixes CLI-267. Thanks to Ricardo Ribeiro. |
britter |
 |
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 |
 |
LongOpt falsely detected as ambiguous. Fixes CLI-252. Thanks to Simon Harrer. |
britter |
Release 1.3 – 2015-05-09
Type |
Changes |
By |
 |
Fixed broken Javadoc links on Introduction page. Fixes CLI-248. |
djones |
 |
Fixed code example in javadoc of "Option#Builder#valueSeparator(char)". Fixes CLI-234. Thanks to Greg Thomas. |
tn |
 |
Clarified behavior of "OptionValidator#validateOption(String)" in case of null input. Fixes CLI-241. Thanks to Beluga Behr. |
tn |
 |
Small cleanup of Option class. Fixes CLI-240. Thanks to Beluga Behr. |
tn |
 |
Removed DoubleCheckedLocking test from checkstyle configuration. Fixes CLI-231. Thanks to Duncan Jones. |
tn |
 |
Options.getRequiredOptions() now returns an unmodifiable list. Fixes CLI-230. |
tn |
 |
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 |
 |
Clarify javadoc for CommandLine.getOptionValue() that the first specified
argument will be returned. Fixes CLI-218. Thanks to Sven. |
tn |
 |
Added new method Options.addOption(String, String). Fixes CLI-214. Thanks to Alexandru Mocanu. |
tn |
 |
Changed unit tests to junit 4 annotation style. Fixes CLI-227. Thanks to Duncan Jones. |
tn |
 |
Default options will now work correctly with required options that are missing. Fixes CLI-202. |
ebourg |
 |
Default options will now work correctly together with option groups. Fixes CLI-203. |
ebourg |
 |
The javadoc of OptionBuilder now states that the class is not thread-safe. Fixes CLI-209. Thanks to Thomas Herre. |
ebourg |
 |
HelpFormatter now supports setting the displayed separator of long options. Fixes CLI-169. Thanks to J. Lewis Muir. |
ebourg |
 |
Improve description of parameter "stopAtNonOption" in method
CommandLine.parse(Options, String[], boolean). Fixes CLI-197. Thanks to Anders Larsson. |
ebourg |
 |
Passing default values for not defined options to a parser will now trigger
a ParseException instead of a NullPointerException. Fixes CLI-204. |
ebourg |
 |
HelpFormatter.setArgName(String) now correctly sets the argument name. Fixes CLI-205. |
ebourg |
 |
Default properties provided as input to the Parser.parse() methods are now
correctly processed. Fixes CLI-201. |
ebourg |
 |
CommandLine.getParsedOptionValue() now returns a String object if no
option type has been explicitly set. Fixes CLI-215. Thanks to Manuel Müller. |
ebourg |
 |
Fixed typo in javadoc of class CommandLine. Fixes CLI-200. Thanks to Gerard Weatherby. |
ggregory |
 |
Source code now uses generic types instead of raw types where possible. Fixes CLI-223. Thanks to Gerard Weatherby. |
ebourg |
 |
Corrected javadoc for return type of MissingOptionException.getMissingOptions(). Fixes CLI-220. Thanks to Joe Casadonte. |
ebourg |
 |
HelpFormatter now prints command-line options in the same order as they
have been added. Fixes CLI-212. Thanks to Per Cederberg. |
ebourg |
 |
Standard help text now shows mandatory arguments also for the first option. Fixes CLI-186. Thanks to Kristoff Kiefer. |
ebourg |
 |
HelpFormatter does not strip anymore leading whitespace in the footer text. Fixes CLI-207. Thanks to Uri Moszkowicz. |
ebourg |
 |
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 |
 |
Negative numerical arguments take precedence over numerical options (only supported
by the new DefaultParser). Fixes CLI-184. |
ebourg |
 |
Fix possible StringIndexOutOfBoundsException in HelpFormatter. Fixes CLI-193. Thanks to Travis McLeskey. |
ebourg |
 |
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 |
 |
OptionGroups no longer throw an AlreadySelectedException when reused for several parsings. Fixes CLI-183. |
ebourg |
 |
OptionGroup now selects properly an option with no short name. Fixes CLI-182. |
ebourg |
 |
PosixParser now supports partial long options (--ver instead of --version). Fixes CLI-160. |
ebourg |
Release 1.2 – 2009-03-19
Type |
Changes |
By |
 |
OptionBuilder is now reseted if an IllegalArgumentException occurs in create(). Fixes CLI-177. |
joehni |
 |
Ant build system removed. |
bayard |
 |
Incomplete usage documentation about Java property option. Fixes CLI-154. |
ebourg |
 |
TypeHandler prints messages to stderr. Fixes CLI-170. |
bayard |
 |
Infinite loop in the wrapping code of HelpFormatter. Fixes CLI-162. |
bayard |
 |
Fixing some minor javadoc issues. |
sgoeschl |
 |
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 |
 |
Added a getOptionProperties() method in the CommandLine class to retrieve easily the key/value pairs
specified with options like -Dkey1=value1 -Dkey2=value2. |
ebourg |
 |
GnuParser now supports long options with an '=' sign (ie. --foo=bar and -foo=bar). Fixes CLI-157. |
ebourg |
 |
PosixParser no longer ignores unrecognized short options. Fixes CLI-164. |
ebourg |
 |
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 |
 |
PosixParser no longer keeps processing the tokens after an unrecognized long option
when stopAtNonOption is enabled. Fixes CLI-165. |
ebourg |
 |
Required options are properly checked if an Options instance is used twice to parse a command line. Fixes CLI-156. |
ebourg |
 |
The ordering of options can be defined in help messages. Fixes CLI-155. |
bayard |
 |
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 |
 |
The message of MissingOptionException has been improved. Fixes CLI-149. |
bayard |
 |
The exceptions have been enhanced with methods to retrieve easily the related options. Fixes CLI-86. |
ebourg |
 |
Option.toString() now reports arguments properly. Fixes CLI-141. Thanks to Henning Schmiedehausen, Bjorn Townsend. |
bayard |
 |
The Parser class has been changed to be more easily extendable. Fixes CLI-142. Thanks to Henning Schmiedehausen. |
bayard |
 |
The following classes are now serializable: Option, OptionGroup, CommandLine and Options. Fixes CLI-140. |
bayard |
 |
OptionValidator is no longer public, its methods were all private. |
ebourg |
Release 1.1 – 2007-07-08
Type |
Changes |
By |
 |
Wrong usage summary. Fixes CLI-2. |
|
 |
Dependecy on commons-lang-2.0 but commons-lang-1.0 is obtained. Fixes CLI-5. |
|
 |
Line separator as first char for helpformatter (footer) throws exception. Fixes CLI-8. |
|
 |
CommandLine.getOptionValue() behaves contrary to docs. Fixes CLI-13. |
|
 |
clone method in Option should use super.clone(). Fixes CLI-21. |
|
 |
Passing properties in Parser does not work for options with a single argument. Fixes CLI-23. |
|
 |
Only long options without short option seems to be noticed. Fixes CLI-26. |
|
 |
Infinite Loop in Command-Line processing. Fixes CLI-28. |
|
 |
Options should not be able to be added more than once. Fixes CLI-29. |
|
 |
HelpFormatter doesn't sort options properly. Fixes CLI-35. |
|
 |
HelpFormatter doesn't function correctly for options with only LongOpt. Fixes CLI-38. |
|
 |
Document enhancement. Fixes CLI-44. |
|
 |
Documentation errors. Fixes CLI-45. |
|
 |
Parameter value "-something" misinterpreted as a parameter. Fixes CLI-51. |
|
 |
clone() method doesn't fully clone contents. Fixes CLI-56. |
|
 |
No Javadoc for HelpFormatter!. Fixes CLI-59. |
|
 |
Parser breaks up command line parms into single characters. Fixes CLI-65. |
|
 |
Missing arguments in HelpFormatter.renderOptions(..). Fixes CLI-67. |
|
 |
Error parsing option arguments. Fixes CLI-69. |
|
 |
A weakness of parser. Fixes CLI-71. |
|
 |
Setting description of a Option. Fixes CLI-78. |
|
 |
CLI_1_BRANCH build.xml doesn't work. Fixes CLI-129. |
|
 |
Remove the Commons Lang dependency. Fixes CLI-130. |
|
 |
Options class returns options in random order. Fixes CLI-131. |
|
 |
MissingOptionException should contain a useful error message. Fixes CLI-132. |
|
 |
NullPointerException in Util.stripLeadingHyphens when passed a null argument. Fixes CLI-133. |
|
 |
1.1 is not backwards compatible because it adds methods to the CommandLineParser interface. Fixes CLI-134. |
|
 |
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.
|