Bootstrap Maven as non-modular packages
Resolves: rhbz#1951482
This commit is contained in:
parent
d8bf8978d8
commit
2cd5f9fd78
@ -1,31 +1,31 @@
|
||||
# unit tests do not finish or crash the JVM
|
||||
%bcond_with tests
|
||||
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
|
||||
# CentOS Stream, See https://bugzilla.redhat.com/1969370
|
||||
%global __bootstrap ~bootstrap
|
||||
|
||||
%global srcname commons-io
|
||||
%bcond_without bootstrap
|
||||
|
||||
Name: apache-commons-io
|
||||
Epoch: 1
|
||||
Version: 2.8.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Utilities to assist with developing IO functionality
|
||||
License: ASL 2.0
|
||||
|
||||
URL: https://commons.apache.org/io
|
||||
Source0: https://archive.apache.org/dist/commons/io/source/%{srcname}-%{version}-src.tar.gz
|
||||
|
||||
Patch0: 0001-Fix-Files.size-failing-when-symlink-target-is-non-ex.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: maven-local
|
||||
Source0: https://archive.apache.org/dist/commons/io/source/commons-io-%{version}-src.tar.gz
|
||||
|
||||
Patch0: 0001-Fix-Files.size-failing-when-symlink-target-is-non-ex.patch
|
||||
|
||||
BuildRequires: maven-local-openjdk8
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
BuildRequires: mvn(org.apache.commons:commons-lang3)
|
||||
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: mvn(junit:junit)
|
||||
BuildRequires: mvn(org.junit.jupiter:junit-jupiter)
|
||||
BuildRequires: mvn(org.mockito:mockito-core)
|
||||
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -33,57 +33,56 @@ Commons-IO contains utility classes, stream implementations,
|
||||
file filters, and endian classes. It is a library of utilities
|
||||
to assist with developing IO functionality.
|
||||
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
API documentation for %{name}.
|
||||
|
||||
%{?javadoc_package}
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}-src
|
||||
%setup -q -n commons-io-%{version}-src
|
||||
%patch0 -p1
|
||||
sed -i 's/\r//' *.txt
|
||||
|
||||
%if %{with tests}
|
||||
# com.google.jimfs:jimfs is not packaged for fedora
|
||||
%pom_remove_dep com.google.jimfs:jimfs
|
||||
rm src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
|
||||
|
||||
# junit-pioneer is not packaged for fedora
|
||||
%pom_remove_dep :junit-pioneer
|
||||
rm src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
|
||||
rm src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
|
||||
%endif
|
||||
# Run tests in multiple reusable forks to improve test performance
|
||||
sed -i -e /reuseForks/d -e /forkCount/d pom.xml
|
||||
sed -i '/<argLine>/d' pom.xml
|
||||
|
||||
%mvn_file : commons-io %{name}
|
||||
%mvn_alias : org.apache.commons:
|
||||
|
||||
%pom_remove_dep org.junit-pioneer:junit-pioneer
|
||||
%pom_remove_dep com.google.jimfs:jimfs
|
||||
|
||||
# Test depends on com.google.jimfs:jimfs
|
||||
rm src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
|
||||
|
||||
# This annotation is part of junitpioneer
|
||||
sed -i '/DefaultLocale/d' src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
|
||||
sed -i '/DefaultLocale/d' src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
|
||||
|
||||
%build
|
||||
%if %{with tests}
|
||||
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.io
|
||||
%else
|
||||
%mvn_build -f -- -Dcommons.osgi.symbolicName=org.apache.commons.io
|
||||
%endif
|
||||
# See "-DcommonsIoVersion" in maven-surefire for the tested version
|
||||
|
||||
# The following tests fail on tmpfs/nfs:
|
||||
# * PathUtilsDeleteDirectoryTest.testDeleteDirectory1FileSize0OverrideReadOnly:80->testDeleteDirectory1FileSize0:68 » FileSystem
|
||||
# * PathUtilsDeleteFileTest.testDeleteReadOnlyFileDirectory1FileSize1:114 » FileSystem
|
||||
# * PathUtilsDeleteFileTest.testSetReadOnlyFileDirectory1FileSize1:134 » FileSystem
|
||||
# * PathUtilsDeleteTest.testDeleteDirectory1FileSize0OverrideReadonly:97->testDeleteDirectory1FileSize0:69 » FileSystem
|
||||
# * PathUtilsDeleteTest.testDeleteDirectory1FileSize1OverrideReadOnly:145->testDeleteDirectory1FileSize1:117 » FileSystem
|
||||
|
||||
%mvn_build -f -- -Dcommons.osgi.symbolicName=org.apache.commons.io
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
%doc RELEASE-NOTES.txt
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.8.0-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.8.0-5
|
||||
- Bootstrap Maven for CentOS Stream 9
|
||||
|
||||
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.8.0-4
|
||||
- Bootstrap build
|
||||
- Non-bootstrap build
|
||||
|
||||
* Wed Feb 3 2021 Mat Booth <mat.booth@redhat.com> - 1:2.8.0-3
|
||||
- Add patch to fix Files.size() failing when symlink target is non-existant
|
||||
@ -94,9 +93,15 @@ rm src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
|
||||
* Fri Oct 16 2020 Fabio Valentini <decathorpe@gmail.com> - 1:2.8.0-1
|
||||
- Update to version 2.8.0.
|
||||
|
||||
* Fri Sep 18 2020 Marian Koncek <mkoncek@redhat.com> - 1:2.8.0-1
|
||||
- Update to upstream version 2.8.0
|
||||
|
||||
* Tue Aug 18 2020 Fabio Valentini <decathorpe@gmail.com> - 1:2.7-1
|
||||
- Update to version 2.7.
|
||||
|
||||
* Wed Jul 29 2020 Marian Koncek <mkoncek@redhat.com> - 1:2.7-1
|
||||
- Update to upstream version 2.7
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
@ -106,9 +111,18 @@ rm src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.6-6
|
||||
- Build with OpenJDK 8
|
||||
|
||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.6-5
|
||||
- Mass rebuild for javapackages-tools 201902
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2.6-4
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
* Thu Feb 07 2019 Mat Booth <mat.booth@redhat.com> - 1:2.6-6
|
||||
- Rebuild to regenerate OSGi metadata
|
||||
|
||||
@ -232,4 +246,3 @@ rm src/test/java/org/apache/commons/io/output/XmlStreamWriterTest.java
|
||||
* Tue May 11 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1:1.4-1
|
||||
- Rename and rebase of jakarta-commons-io
|
||||
- Clean up whole spec
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user