Compare commits

..

8 commits

Author SHA1 Message Date
Fedora Release Engineering
5b25f257f7 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:46:23 +00:00
Mikolaj Izdebski
e42d8406c9 Update to upstream version 1.10.0 2025-10-10 16:58:26 +02:00
Jiri Vanek
45da626305 Rebuilt for java-25-openjdk as preffered jdk
https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk
Note, that since f43, you should be always explicit on what jdk to use.
This commit should do exactly that.
2025-07-29 19:00:47 +02:00
Fedora Release Engineering
b77f92e4d0 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 17:05:12 +00:00
Mikolaj Izdebski
194e595e35 Build with OpenJDK 25 2025-07-13 09:22:51 +02:00
Mikolaj Izdebski
3cddc8dbdd Switch javapackages test plan to f43 ref 2025-05-22 13:35:31 +02:00
Mikolaj Izdebski
a05ce65ef6 Switch to javapackages tests from CentOS Stream GitLab 2025-03-26 08:43:18 +01:00
Mikolaj Izdebski
7f93d30820 Remove javadoc subpackage 2025-03-03 12:53:30 +01:00
5 changed files with 78 additions and 14 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@
/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

@ -0,0 +1,67 @@
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.9.0
Version: 1.10.0
Release: %autorelease
Summary: Command Line Interface Library for Java
License: Apache-2.0
@ -11,10 +11,12 @@ 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
BuildRequires: maven-local-openjdk25
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
@ -23,17 +25,13 @@ 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
@ -42,7 +40,7 @@ API documentation for %{name}.
%mvn_file : commons-cli %{name}
%build
%mvn_build
%mvn_build -j
%install
%mvn_install
@ -51,7 +49,5 @@ API documentation for %{name}.
%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://src.fedoraproject.org/tests/javapackages
ref: f42
url: https://gitlab.com/redhat/centos-stream/tests/javapackages.git
ref: f43
execute:
how: tmt

View file

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