%bcond_with bootstrap

Name:           apache-commons-lang3
Version:        3.20.0
Release:        1
Summary:        Provides a host of helper utilities for the java.lang API
License:        Apache-2.0
URL:            https://commons.apache.org/proper/commons-lang/
Source0:        https://archive.apache.org/dist/commons/lang/source/commons-lang3-%{version}-src.tar.gz

BuildArch:      noarch

%if %{with bootstrap}
BuildRequires:  javapackages-bootstrap
%else
BuildRequires:  maven-local
BuildRequires:  mvn(biz.aQute.bnd:biz.aQute.bndlib)
BuildRequires:  mvn(com.google.code.findbugs:jsr305)
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires:  mvn(org.easymock:easymock)
BuildRequires:  mvn(org.hamcrest:hamcrest)
BuildRequires:  mvn(org.junit.jupiter:junit-jupiter)
%endif

%description
The standard Java libraries fail to provide enough methods for
manipulation of its core classes. The Commons Lang Component provides
these extra methods.
The Commons Lang Component provides a host of helper utilities for the
java.lang API, notably String manipulation methods, basic numerical
methods, object reflection, creation and serialization, and System
properties. Additionally it contains an inheritable enum type, an
exception structure that supports multiple types of nested-Exceptions
and a series of utilities dedicated to help with building methods, such
as hashCode, toString and equals.

With version of commons-lang 3.x, developers decided to change API and
therefore created differently named artifact and jar files. This is
the new version, while apache-commons-lang is the compatibility
package.

%package        help
Summary:        Documents for apache-commons-lang3

Provides:       %{name}-javadoc = %{version}-%{release}
Obsoletes:      %{name}-javadoc < %{version}-%{release}

%description    help
The apache-commons-lang3-help package contains related documents.

%prep
%autosetup -n commons-lang3-%{version}-src -p1
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_dep org.openjdk.jmh:jmh-core
%pom_remove_dep org.openjdk.jmh:jmh-generator-annprocess
%pom_remove_dep org.apache.commons:commons-text
%mvn_file : %{name} commons-lang3
sed -i 's/\s*public void testParseSync().*/@org.junit.jupiter.api.Disabled\n&/' \
    src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
rm src/test/java/org/apache/commons/lang3/RandomStringUtilsTest.java
rm src/test/java/org/apache/commons/lang3/HashSetvBitSetTest.java
sed -i '/<argLine>/d' pom.xml

%build
%mvn_build -f

%install
%mvn_install

%files -f .mfiles
%license LICENSE.txt NOTICE.txt

%files help -f .mfiles-javadoc
%doc RELEASE-NOTES.txt

%changelog
* Thu Jul 02 2026 Ge Wang <wang__ge@126.com> - 3.20.0-1
- Update to 3.20.0

* Tue Feb 10 2026 yaoxin <1024769339@qq.com> - 3.19.0-2
- Adapting to maven upgrade

* Tue Sep 16 2025 xu_ping <707078654@qq.com> - 3.19.0-1
- Upgrade version to 3.19.0

* Thu Jul 17 2025 liyajie<liyajie15@h-partners.com> - 3.18.0-1
- Upgrade version to 3.18.0

* Mon Nov 04 2024 Jiansong Shao <shaojiansong@kylinos.cn> - 3.17.0-1
- Upgrade version to 3.17.0 and update project home url

* Tue Jan 16 2024 xu_ping <707078654@qq.com> - 3.14.0-1
- Upgrade version to 3.14.0

* Thu Dec 05 2019 Jiangping Hu <hujiangping@huawei.com> - 3.9.3-3
- Package init