Compare commits

..

No commits in common. "rawhide" and "f42" have entirely different histories.

5 changed files with 14 additions and 78 deletions

1
.gitignore vendored
View file

@ -6,4 +6,3 @@
/commons-cli-1.6.0-src.tar.gz
/commons-cli-1.8.0-src.tar.gz
/commons-cli-1.9.0-src.tar.gz
/commons-cli-1.10.0-src.tar.gz

View file

@ -1,67 +0,0 @@
From 92fcda0792a631eebef413a6608bd9c91794158d Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 10 Oct 2025 16:50:15 +0200
Subject: [PATCH] Port tests to commons-lang3
We want to avoid dependency on commons-text for now.
---
pom.xml | 4 ++--
.../org/apache/commons/cli/example/AptHelpAppendable.java | 6 +++---
.../org/apache/commons/cli/example/XhtmlHelpAppendable.java | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2663f3f..95ac48c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,8 +69,8 @@
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- <version>1.14.0</version>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.18.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java b/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java
index cbedfe2..7e275c1 100644
--- a/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java
+++ b/src/test/java/org/apache/commons/cli/example/AptHelpAppendable.java
@@ -25,8 +25,8 @@ import org.apache.commons.cli.help.FilterHelpAppendable;
import org.apache.commons.cli.help.TableDefinition;
import org.apache.commons.cli.help.TextStyle;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.translate.CharSequenceTranslator;
-import org.apache.commons.text.translate.LookupTranslator;
+import org.apache.commons.lang3.text.translate.CharSequenceTranslator;
+import org.apache.commons.lang3.text.translate.LookupTranslator;
/**
* Appends APT formatted text to an {@link Appendable}.
@@ -45,7 +45,7 @@ public class AptHelpAppendable extends FilterHelpAppendable {
escapeAptMap.put("*", "\\*");
escapeAptMap.put("+", "\\+");
escapeAptMap.put("|", "\\|");
- ESCAPE_APT = new LookupTranslator(escapeAptMap);
+ ESCAPE_APT = new LookupTranslator(escapeAptMap.entrySet().stream().map(e -> new CharSequence[]{ e.getKey(), e.getValue() }).toArray(CharSequence[][]::new));
}
/**
diff --git a/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java b/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java
index 51ae058..ee6f2b3 100644
--- a/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java
+++ b/src/test/java/org/apache/commons/cli/example/XhtmlHelpAppendable.java
@@ -24,7 +24,7 @@ import java.util.Objects;
import org.apache.commons.cli.help.FilterHelpAppendable;
import org.apache.commons.cli.help.TableDefinition;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
/**
* Appends XHTML formatted text to an {@link Appendable}.
--
2.51.0

View file

@ -1,7 +1,7 @@
%bcond_with bootstrap
Name: apache-commons-cli
Version: 1.10.0
Version: 1.9.0
Release: %autorelease
Summary: Command Line Interface Library for Java
License: Apache-2.0
@ -11,12 +11,10 @@ ExclusiveArch: %{java_arches} noarch
Source0: https://www.apache.org/dist/commons/cli/source/commons-cli-%{version}-src.tar.gz
Patch: 0001-Port-tests-to-commons-lang3.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local-openjdk25
BuildRequires: maven-local
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
@ -25,13 +23,17 @@ BuildRequires: mvn(org.junit.jupiter:junit-jupiter-engine)
BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params)
BuildRequires: mvn(org.mockito:mockito-core)
%endif
# TODO Remove in Fedora 46
Obsoletes: %{name}-javadoc < 1.9.0-7
%description
The CLI library provides a simple and easy to use API for working with the
command line arguments and options.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
API documentation for %{name}.
%prep
%autosetup -p1 -C
@ -40,7 +42,7 @@ command line arguments and options.
%mvn_file : commons-cli %{name}
%build
%mvn_build -j
%mvn_build
%install
%mvn_install
@ -49,5 +51,7 @@ command line arguments and options.
%license LICENSE.txt NOTICE.txt
%doc README.md RELEASE-NOTES.txt
%files javadoc -f .mfiles-javadoc
%changelog
%autochangelog

View file

@ -1,7 +1,7 @@
summary: Run javapackages-specific tests
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/javapackages.git
ref: f43
url: https://src.fedoraproject.org/tests/javapackages
ref: f42
execute:
how: tmt

View file

@ -1 +1 @@
SHA512 (commons-cli-1.10.0-src.tar.gz) = 245951919a88068f692fc4cab906cb210bbefd853d851167d5c34fd4aebab7370766458033c47cf8174d7a409c4364752770b573252d19746cbb9a0e2c8c255b
SHA512 (commons-cli-1.9.0-src.tar.gz) = d20df809e8e0ebed79c57af9c9b447b0068347ba0edfcdec3652cb00bd9575b24fc77093d735e827d9d02a6fe2681bf239fd01df5f7c682ae34ade0781c53e35