From a4eef552a1d2ca0873f1d86b41e6c03d32cee0b7aef9ed955e2d2bd58aeccb8b Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Thu, 16 Dec 2021 20:22:31 +0000 Subject: [PATCH] Accepting request 940950 from home:david.anes:branches:Java:packages Update to 1.5.0 OBS-URL: https://build.opensuse.org/request/show/940950 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-cli?expand=0&rev=34 --- CLI-253-workaround.patch | 47 ++++++++++++++++++------------------ apache-commons-cli-build.xml | 20 +++++++-------- apache-commons-cli-rpmlintrc | 1 + apache-commons-cli.changes | 46 +++++++++++++++++++++++++++++++++++ apache-commons-cli.spec | 7 +++--- commons-cli-1.4-src.tar.gz | 3 --- commons-cli-1.5.0-src.tar.gz | 3 +++ 7 files changed, 87 insertions(+), 40 deletions(-) create mode 100644 apache-commons-cli-rpmlintrc delete mode 100644 commons-cli-1.4-src.tar.gz create mode 100644 commons-cli-1.5.0-src.tar.gz diff --git a/CLI-253-workaround.patch b/CLI-253-workaround.patch index 213e9b8..6e2ecc2 100644 --- a/CLI-253-workaround.patch +++ b/CLI-253-workaround.patch @@ -6,14 +6,15 @@ CommitDate: Mon Jun 22 15:04:05 2015 +0200 [CLI-253] Prevent "Unrecognized option: --null" when handling long opts in PosixParser -diff --git a/src/main/java/org/apache/commons/cli/Options.java b/src/main/java/org/apache/commons/cli/Options.java -index 0ee4eea..1c38194 100644 ---- a/src/main/java/org/apache/commons/cli/Options.java -+++ b/src/main/java/org/apache/commons/cli/Options.java -@@ -224,6 +224,20 @@ public class Options implements Serializable +Index: commons-cli-1.5.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 + return this; } - /** ++ /* + * Retrieve the {@link Option} matching the long name specified. + * The leading hyphens in the name are ignored (up to 2). + * @@ -27,28 +28,26 @@ index 0ee4eea..1c38194 100644 + return longOpts.get(opt); + } + -+ /** - * Returns the options with a long name starting with the name specified. - * - * @param opt the partial name of the option -diff --git a/src/main/java/org/apache/commons/cli/PosixParser.java b/src/main/java/org/apache/commons/cli/PosixParser.java -index c13a65e..14d2936 100644 ---- a/src/main/java/org/apache/commons/cli/PosixParser.java -+++ b/src/main/java/org/apache/commons/cli/PosixParser.java -@@ -131,7 +131,7 @@ public class PosixParser extends Parser - } - else - { + /** + * 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 +=================================================================== +--- 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 +@@ -145,7 +145,7 @@ public class PosixParser extends Parser + } else if (matchingOpts.size() > 1) { + throw new AmbiguousOptionException(opt, matchingOpts); + } else { - currentOption = options.getOption(matchingOpts.get(0)); + currentOption = options.getLongOption(matchingOpts.get(0)); - + tokens.add("--" + currentOption.getLongOpt()); - if (pos != -1) -diff --git a/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java b/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java -new file mode 100644 -index 0000000..e37b7bc + if (pos != -1) { +Index: commons-cli-1.5.0-src/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java +=================================================================== --- /dev/null -+++ b/src/test/java/org/apache/commons/cli/bug/BugCLI253Test.java ++++ commons-cli-1.5.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 63c1d0d..f00bf4f 100644 --- a/apache-commons-cli-build.xml +++ b/apache-commons-cli-build.xml @@ -6,7 +6,7 @@ - + @@ -43,10 +43,10 @@ debug="true" optimize="false" deprecation="true" - target="6" + target="7" verbose="false" fork="false" - source="6"> + source="7"> @@ -85,10 +85,10 @@ nonavbar="false" serialwarn="false" charset="ISO-8859-1" - source="6" + source="7" linksource="true" breakiterator="false"> - + @@ -110,17 +110,17 @@ - - + + - + - + - + diff --git a/apache-commons-cli-rpmlintrc b/apache-commons-cli-rpmlintrc new file mode 100644 index 0000000..4fc39a5 --- /dev/null +++ b/apache-commons-cli-rpmlintrc @@ -0,0 +1 @@ +addFilter("apache-commons-cli-javadoc.noarch: W: package-with-huge-docs") \ No newline at end of file diff --git a/apache-commons-cli.changes b/apache-commons-cli.changes index eb99ea9..89bd15b 100644 --- a/apache-commons-cli.changes +++ b/apache-commons-cli.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Thu Dec 16 16:26:28 UTC 2021 - David Anes + +- Rebased patch CLI-253-workaround.patch to new version. +- Updated build XML file to new version. +- Harmonized the use of X.Y.X strings everywhere. +- Updated new source locations from Apache. +- Added 'apache-commons-cli-rpmlintrc' to silence 'package-with-huge-docs' warning (Javadoc generates many files...) + +- Update to 1.5: + * New features: + - (CLI-217) Accommodate toggling partial matching in DefaultParser. Thanks to Rubin Simons. + - (CLI-274) Option parser type EXISTING_FILE_VALUE not check file existing Thanks to Béla Schaum. + - (CLI-271) CommandLine.getXXX and CommandLine.hasXXX should accept an Option as a parameter Thanks to Christoph Läubrich. + - (CLI-276) Adjust access-modifier of checkRequiredOptions() to protected. Thanks to Jason Dillon. + - (CLI-282) TypeHandler should throw ParseException for an unsupported class. Thanks to Alex Nordlund. + - Added setter for Builder.option #33. Thanks to Waldemar Sojka, Gary Gregory. + - Add Option unit tests #76. Thanks to Waldemar Sojka, Gary Gregory. + * Fixed bugs: + - Fix NPE in DefaultParser.isLongOption(String). Thanks to Gary Gregory. + - (CLI-279) @param or @return lines should end with a period in CommandLine.java Thanks to Krishna Mohan Rao Kandunoori. + - Replace deprecated FindBugs with SpotBugs. Thanks to Gary Gregory. + - Replace CLIRR with JApiCmp. Thanks to Gary Gregory. + - Option Javadocs grammar nits #55. Thanks to Elliotte Rusty Harold. + - Minor Improvements #57, #61. Thanks to Arturo Bernal, Gary Gregory. + - (CLI-254) Input "test" gets parsed as test, quotes die #58. Thanks to stoty. + - (CLI-287) Allow whitespace-only header and footer #26. Thanks to MrQubo, Gary Gregory. + * Updates: + - (CLI-294) Update Java from version 5 to 7. + - Docs: Replace OptionBuilder in usage page #30. Thanks to Mincong Huang. + - Remove deprecated sudo setting. #36. Thanks to dengliming. + - Bump junit:junit from 4.12 to 4.13.2, #53, #60. Thanks to Gary Gregory, Dependabot. + - Bump commons-parent from 48 to 52. Thanks to Dependabot. + - Bump maven-pmd-plugin from 3.12.0 to 3.15.0, #44, #54, #67. Thanks to Dependabot. + - Bump actions/checkout from v2.3.1 to v2.3.5 #46, #72. Thanks to Dependabot. + - Bump actions/setup-java from v1.4.2 to v2 #50. Thanks to Dependabot, Gary Gregory. + - Bump maven-antrun-plugin from 1.7 to 3.0.0 #43. Thanks to Dependabot. + - Bump maven-checkstyle-plugin from 2.15 to 3.1.2 #41. Thanks to Gary Gregory. + - Bump checkstyle to 9.0.1 #68. Thanks to Gary Gregory. + - Bump actions/cache from 2 to 2.1.6 #64, #65. Thanks to Dependabot. + - Bump commons.animal-sniffer.version 1.19 -> 1.20. Thanks to Gary Gregory. + - Bump maven-bundle-plugin 5.1.1 -> 5.1.2. Thanks to Gary Gregory. + - Bump biz.aQute.bndlib.version 5.1.2 -> 6.0.0. Thanks to Gary Gregory. + - Bump spotbugs from 4.4.1 to 4.4.2 #70. Thanks to Dependabot. + - Bump spotbugs-maven-plugin from 4.4.1 to 4.4.2.2 #71. Thanks to Dependabot.- + ------------------------------------------------------------------- Fri Feb 12 12:54:07 UTC 2021 - Fridrich Strba diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec index b4f4bee..dd2323f 100644 --- a/apache-commons-cli.spec +++ b/apache-commons-cli.spec @@ -19,14 +19,15 @@ %global base_name cli %global short_name commons-%{base_name} Name: apache-commons-cli -Version: 1.4 +Version: 1.5.0 Release: 0 Summary: Command Line Interface Library for Java License: Apache-2.0 Group: Development/Libraries/Java -URL: http://commons.apache.org/%{base_name}/ -Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz +URL: https://commons.apache.org/%{base_name}/ +Source0: https://dlcdn.apache.org/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz Source1: %{name}-build.xml +Source2: apache-commons-cli-rpmlintrc Patch0: CLI-253-workaround.patch BuildRequires: ant BuildRequires: fdupes diff --git a/commons-cli-1.4-src.tar.gz b/commons-cli-1.4-src.tar.gz deleted file mode 100644 index f7553c1..0000000 --- a/commons-cli-1.4-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a1def8d94e4fe6be4ffde100a74a647fe3df5ba02f85e3c9191fbb00be880f16 -size 148530 diff --git a/commons-cli-1.5.0-src.tar.gz b/commons-cli-1.5.0-src.tar.gz new file mode 100644 index 0000000..e8f49fe --- /dev/null +++ b/commons-cli-1.5.0-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26420d8a09a71cce936c40a1c977cbb20d1cdb0d25473c25164d4837927f7ee3 +size 156731