diff --git a/CLI-253-workaround.patch b/CLI-253-workaround.patch
index 6e2ecc2..1876bcf 100644
--- a/CLI-253-workaround.patch
+++ b/CLI-253-workaround.patch
@@ -6,11 +6,11 @@ CommitDate: Mon Jun 22 15:04:05 2015 +0200
[CLI-253] Prevent "Unrecognized option: --null" when handling long opts in PosixParser
-Index: commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/Options.java
+Index: commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/Options.java
===================================================================
---- commons-cli-1.5.0-src.orig/src/main/java/org/apache/commons/cli/Options.java
-+++ commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/Options.java
-@@ -186,6 +186,20 @@ public class Options implements Serializ
+--- commons-cli-1.7.0-src.orig/src/main/java/org/apache/commons/cli/Options.java
++++ commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/Options.java
+@@ -195,6 +195,20 @@ public class Options implements Serializ
return this;
}
@@ -31,10 +31,10 @@ Index: commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/Options.java
/**
* Gets the options with a long name starting with the name specified.
*
-Index: commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/PosixParser.java
+Index: commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/PosixParser.java
===================================================================
---- commons-cli-1.5.0-src.orig/src/main/java/org/apache/commons/cli/PosixParser.java
-+++ commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/PosixParser.java
+--- commons-cli-1.7.0-src.orig/src/main/java/org/apache/commons/cli/PosixParser.java
++++ commons-cli-1.7.0-src/src/main/java/org/apache/commons/cli/PosixParser.java
@@ -145,7 +145,7 @@ public class PosixParser extends Parser
} else if (matchingOpts.size() > 1) {
throw new AmbiguousOptionException(opt, matchingOpts);
@@ -44,10 +44,10 @@ Index: commons-cli-1.5.0-src/src/main/java/org/apache/commons/cli/PosixParser.ja
tokens.add("--" + currentOption.getLongOpt());
if (pos != -1) {
-Index: commons-cli-1.5.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java
+Index: commons-cli-1.7.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java
===================================================================
--- /dev/null
-+++ commons-cli-1.5.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java
++++ commons-cli-1.7.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/apache-commons-cli-build.xml b/apache-commons-cli-build.xml
index 5095940..af4ba64 100644
--- a/apache-commons-cli-build.xml
+++ b/apache-commons-cli-build.xml
@@ -6,7 +6,15 @@
-
+
+
+
+
+
+
+
+
+
@@ -43,10 +51,11 @@
debug="true"
optimize="false"
deprecation="true"
- target="8"
- verbose="false"
- fork="false"
- source="8">
+ release="${compiler.release}"
+ target="${compiler.target}"
+ verbose="false"
+ fork="false"
+ source="${compiler.source}">
@@ -84,7 +93,7 @@
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
- source="8"
+ source="${compiler.source}"
linksource="true"
breakiterator="false">
@@ -109,17 +118,17 @@
-
-
+
+
-
+
-
+
-
+
diff --git a/apache-commons-cli.changes b/apache-commons-cli.changes
index a08e443..661120c 100644
--- a/apache-commons-cli.changes
+++ b/apache-commons-cli.changes
@@ -1,3 +1,116 @@
+-------------------------------------------------------------------
+Mon Apr 29 11:36:14 UTC 2024 - Gus Kenion
+
+- Rebased patch CLI-253-workaround.patch to new version.
+- Updated apache-commons-cli-build.xml to new version.
+- Update to 1.7:
+ * New features:
+ - Add and use a Converter interface and implementations without
+ using BeanUtils #216. Fixes CLI-321. Thanks to Claude Warren,
+ Gary Gregory.
+ - Add Maven property project.build.outputTimestamp for build
+ reproducibility. Thanks to Gary Gregory.
+ - Add '-' as an option char and implemented extensive tests
+ #217. Fixes CLI-322. Thanks to Claude Warren, Gary Gregory.
+ - Make adding OptionGroups and Options to existing Options
+ easier #230. Fixes CLI-324. Thanks to Claude Warren, Gary
+ Gregory.
+ - Added Supplier defaults for getParsedOptionValue #229.
+ Fixes CLI-323. Thanks to Claude Warren, Gary Gregory.
+ - Make Option.getKey() public #239. Fixes CLI-326. Thanks to
+ Claude Warren, Gary Gregory.
+ - Add builder factory CommandLine#builder(). Thanks to Claude
+ Warren, Gary Gregory.
+ * Fixes:
+ - Inconsistent behavior in key/value pairs (Java property
+ style). Fixes CLI-312. Thanks to Claude Warren, Gary Gregory.
+ - Avoid NullPointerException in
+ Util.stripLeadingAndTrailingQuotes(String). Thanks to Gary
+ Gregory.
+ - Awkward behavior of Option.builder() for multiple optional
+ args. Fixes CLI-320. Thanks to Paul King, Claude Warren.
+ - Properties from multiple arguments with value separator.
+ #237. Fixes CLI-325. Thanks to Claude Warren.
+ - Fix for expected textual date values. #244. Fixes CLI-327.
+ Thanks to Claude Warren, Gary Gregory.
+ - Option.Builder.option("") should throw
+ IllegalArgumentException instead of
+ ArrayIndexOutOfBoundsException. Thanks to Gary Gregory.
+ - Avoid NullPointerException in
+ CommandLine.getOptionValues(Option|String). Thanks to Gary
+ Gregory.
+ * Updates:
+ - Bump commons-parent from 64 to 69 #256. Thanks to Gary
+ Gregory.
+ - Update the tests to JUnit 5 #238. Thanks to Elric, Gary
+ Gregory.
+ - Bump tests commons-io:commons-io from 2.16.0 to 2.16.1 #258.
+ Thanks to Dependabot, Gary Gregory.
+- Includes changes from version 1.6:
+ * Fixes:
+ - [StepSecurity] ci: Harden GitHub Actions #176. Thanks to
+ step-security-bot, Gary Gregory.
+ - Inconsistent date format in changes report. Fixes CLI-318.
+ Thanks to Alexander Veit, Gary Gregory.
+ - Fix NPE in CommandLine.resolveOption(String). Fixes CLI-283.
+ Thanks to Dilraj Singh, Gary Gregory.
+ - CommandLine.addOption(Option) should not allow a null Option.
+ Fixes CLI-283. Thanks to Dilraj Singh, Gary Gregory.
+ - CommandLine.addArgs(String) should not allow a null String.
+ Fixes CLI-283. Thanks to Gary Gregory.
+ - Site docs: "Usage Scenarios" refers to deprecated methods.
+ Fixes CLI-303. Thanks to Julian Schilling, Gary Gregory.
+ - NullPointerException thrown by CommandLineParser.parse().
+ Fixes CLI-317. Thanks to Philippe Bastiani, Sruteesh Kumar
+ Paramata, Gary Gregory.
+ - StringIndexOutOfBoundsException thrown by
+ CommandLineParser.parse(). Fixes CLI-313. Thanks to Dominik
+ Stadler, HUNG LU, Sruteesh Kumar Paramata.
+ * Updates:
+ - 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.
+ - 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.
+ - 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.
+ - Use EMPTY_STRING_ARRAY constant. #102. Thanks to Ken Dombeck.
+ - Fix site links that are broken #155. Thanks to Arturo Bernal.
+ - Use Math.max() #111. Delete unused assignment #112. Thanks to
+ Arturo Bernal.
+ - Add github/codeql-action. Thanks to Dependabot, Gary Gregory.
+ - Bump Java from 7 to 8. Thanks to Gary Gregory.
+ - Bump actions/cache from 2.1.7 to 3.0.10 #97, #130, #132.
+ Thanks to Dependabot, Gary Gregory.
+ - Bump actions/checkout from 3 to 3.1.0 #133. Thanks to Gary
+ Gregory, Dependabot.
+ - Bump actions/setup-java from 2 to 3.6.0 #136. Thanks to Gary
+ Gregory.
+ - Bump spotbugs from 4.5.3 to 4.7.3 #96, #107, #113, #125,
+ #138. Thanks to Gary Gregory, Dependabot.
+ - Bump spotbugs-maven-plugin from 4.5.3.0 to 4.7.3.0 #98, #108,
+ #115, #117, #126, #145. Thanks to Dependabot.
+ - Bump commons-parent from 52 to 64 #100, #128, #151, #158.
+ Thanks to Dependabot, Gary Gregory.
+ - Bump maven-antrun-plugin from 3.0.0 to 3.1.0 #103. Thanks to
+ Dependabot.
+ - Bump maven-javadoc-plugin from 3.3.2 to 3.4.1 #105, #120.
+ Thanks to Dependabot.
+ - Bump maven-pmd-plugin from 3.16.0 to 3.19.0 #110, #124.
+ Thanks to Dependabot.
+ - Bump jacoco-maven-plugin from 0.8.7 to 0.8.8. Thanks to Gary
+ Gregory.
+ - Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 #121. Thanks
+ to Gary Gregory.
+ - Bump japicmp-maven-plugin from 0.15.4 to 0.16.0. Thanks to
+ Gary Gregory.
+ - Update JUnit 4 to 5 vintage. Thanks to Gary Gregory.
+
-------------------------------------------------------------------
Tue Feb 20 10:25:28 UTC 2024 - Dominique Leuenberger
diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec
index 383f6cb..efa38cf 100644
--- a/apache-commons-cli.spec
+++ b/apache-commons-cli.spec
@@ -19,13 +19,13 @@
%global base_name cli
%global short_name commons-%{base_name}
Name: apache-commons-cli
-Version: 1.5.0
+Version: 1.7.0
Release: 0
Summary: Command Line Interface Library for Java
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/%{base_name}/
-Source0: https://dlcdn.apache.org/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
+Source0: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source1: %{name}-build.xml
Source2: apache-commons-cli-rpmlintrc
Patch0: CLI-253-workaround.patch
diff --git a/commons-cli-1.5.0-src.tar.gz b/commons-cli-1.5.0-src.tar.gz
deleted file mode 100644
index e8f49fe..0000000
--- a/commons-cli-1.5.0-src.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:26420d8a09a71cce936c40a1c977cbb20d1cdb0d25473c25164d4837927f7ee3
-size 156731
diff --git a/commons-cli-1.7.0-src.tar.gz b/commons-cli-1.7.0-src.tar.gz
new file mode 100644
index 0000000..f19f76b
--- /dev/null
+++ b/commons-cli-1.7.0-src.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:34ff1d3f5a41c2d71734468e350b3d30642e75c504cdcd8a97ca7caaa4730cdf
+size 177969