From b7fbffee660bc78d78cc91d50a7168e39b87dbc7 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 7 Jan 2022 09:52:08 +0100 Subject: [PATCH] Module javapackages-tools stream 202001 was retired --- .gitignore | 4 -- CLI-253-workaround.patch | 96 ----------------------------- apache-commons-cli.spec | 129 --------------------------------------- dead.package | 1 + sources | 1 - 5 files changed, 1 insertion(+), 230 deletions(-) delete mode 100644 .gitignore delete mode 100644 CLI-253-workaround.patch delete mode 100644 apache-commons-cli.spec create mode 100644 dead.package delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e77d52a..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/commons-cli-1.2-src.tar.gz -/commons-cli-1.3-src.tar.gz -/commons-cli-1.3.1-src.tar.gz -/commons-cli-1.4-src.tar.gz diff --git a/CLI-253-workaround.patch b/CLI-253-workaround.patch deleted file mode 100644 index 798c5a4..0000000 --- a/CLI-253-workaround.patch +++ /dev/null @@ -1,96 +0,0 @@ -commit 77218790904f40395304669f5d79740f459c0a90 (HEAD -> cli-253, origin/cli-253) -Author: Michal Srb -AuthorDate: Mon Jun 22 15:01:30 2015 +0200 -Commit: Michal Srb -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 - } - - /** -+ * Retrieve the {@link Option} matching the long name specified. -+ * The leading hyphens in the name are ignored (up to 2). -+ * -+ * @param opt long name of the {@link Option} -+ * @return the option represented by opt -+ */ -+ Option getLongOption(String opt) -+ { -+ opt = Util.stripLeadingHyphens(opt); -+ -+ 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 - { -- 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 ---- /dev/null -+++ b/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 -+ * contributor license agreements. See the NOTICE file distributed with -+ * this work for additional information regarding copyright ownership. -+ * The ASF licenses this file to You under the Apache License, Version 2.0 -+ * (the "License"); you may not use this file except in compliance with -+ * the License. You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+package org.apache.commons.cli.bug; -+ -+import static org.junit.Assert.assertTrue; -+ -+import org.apache.commons.cli.CommandLine; -+import org.apache.commons.cli.Option; -+import org.apache.commons.cli.Options; -+import org.apache.commons.cli.ParseException; -+import org.apache.commons.cli.PosixParser; -+import org.junit.Test; -+ -+@SuppressWarnings("deprecation") // tests some deprecated classes -+public class BugCLI253Test { -+ -+ @Test -+ public void testGroovyUseCase() throws ParseException { -+ CommandLine cli = new PosixParser().parse(getOptions(), new String[] { "--classpath" }); -+ assertTrue(cli.hasOption("--classpath")); -+ } -+ -+ private Options getOptions() { -+ Options options = new Options(); -+ options.addOption(Option.builder("classpath").build()); -+ options.addOption(Option.builder("cp").longOpt("classpath").build()); -+ return options; -+ } -+} diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec deleted file mode 100644 index 28e30fe..0000000 --- a/apache-commons-cli.spec +++ /dev/null @@ -1,129 +0,0 @@ -Name: apache-commons-cli -Version: 1.4 -Release: 7%{?dist} -Summary: Command Line Interface Library for Java -License: ASL 2.0 -URL: http://commons.apache.org/cli/ -BuildArch: noarch - -Source0: http://www.apache.org/dist/commons/cli/source/commons-cli-%{version}-src.tar.gz - -# workaround for https://issues.apache.org/jira/browse/CLI-253 -Patch0: CLI-253-workaround.patch - -BuildRequires: maven-local-openjdk8 -BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.apache.commons:commons-parent:pom:) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) - -%description -The CLI library provides a simple and easy to use API for working with the -command line arguments and options. - -%{?module_package} -%{?javadoc_package} - -%prep -%autosetup -p1 -n commons-cli-%{version}-src - -# Compatibility links -%mvn_alias : org.apache.commons:commons-cli -%mvn_file : commons-cli %{name} - -%build -%mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6 - -%install -%mvn_install - -%files -n %{?module_prefix}%{name} -f .mfiles -%license LICENSE.txt NOTICE.txt -%doc README.md RELEASE-NOTES.txt - -%changelog -* Sat Jan 25 2020 Mikolaj Izdebski - 1.4-7 -- Build with OpenJDK 8 - -* Tue Nov 05 2019 Mikolaj Izdebski - 1.4-6 -- Mass rebuild for javapackages-tools 201902 - -* Fri May 24 2019 Mikolaj Izdebski - 1.4-5 -- Mass rebuild for javapackages-tools 201901 - -* Wed Feb 07 2018 Fedora Release Engineering - 1.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Jan 29 2018 Mikolaj Izdebski - 1.4-3 -- Cleanup spec file - -* Wed Jul 26 2017 Fedora Release Engineering - 1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue Apr 11 2017 Michael Simacek - 1.4-1 -- Update to upstream version 1.4 - -* Fri Feb 10 2017 Fedora Release Engineering - 1.3.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Feb 01 2017 Michael Simacek - 1.3.1-5 -- Remove BR on jacoco - -* Wed Jun 15 2016 Mikolaj Izdebski - 1.3.1-4 -- Regenerate build-requires - -* Wed Feb 03 2016 Fedora Release Engineering - 1.3.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 23 2015 Michal Srb - 1.3.1-2 -- Add workaround for CLI-253 - -* Wed Jun 17 2015 Michal Srb - 1.3.1-1 -- Update to upstream version 1.3.1 - -* Wed Jun 17 2015 Fedora Release Engineering - 1.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Jun 3 2015 Mikolaj Izdebski - 1.3-1 -- Update to upstream version 1.3 - -* Sat Jun 07 2014 Fedora Release Engineering - 1.2-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Mar 04 2014 Stanislav Ochotnicky - 1.2-12 -- Use Requires: java-headless rebuild (#1067528) - -* Mon Aug 05 2013 Mat Booth - 1.2-11 -- Update for newer guidelines -- Drop ancient obsoletes/provides on old jakarta name - -* Sat Aug 03 2013 Fedora Release Engineering - 1.2-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Feb 19 2013 Mat Booth - 1.2-9 -- Add missing maven-local BuildRequires - -* Wed Feb 13 2013 Fedora Release Engineering - 1.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 1.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jan 12 2012 Fedora Release Engineering - 1.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Wed Nov 30 2011 Alexander Kurtakov 1.2-5 -- Build with maven 3. -- Adapt to current guidelines. - -* Mon Feb 07 2011 Fedora Release Engineering - 1.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Nov 9 2010 Chris Spike 1.2-3 -- Removed maven* BRs in favour of apache-commons-parent -- Added deprecated groupId to depmap for compatibility reasons - -* Mon Oct 18 2010 Chris Spike 1.2-2 -- Removed Epoch - -* Sun Oct 3 2010 Chris Spike 1.2-1 -- Rename and rebase from jakarta-commons-cli diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..78f11b3 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Module javapackages-tools stream 202001 was retired diff --git a/sources b/sources deleted file mode 100644 index 5adca89..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (commons-cli-1.4-src.tar.gz) = a5db856f6154e4340aab1865e3b34c752c0dceb8063faa64740ed470d8e6b3e7782242ae51d6bb57a535a6d6dad2943cc3130d7202223b8f89b8cbecdc3d9d4f