diff --git a/plexus-sec-dispatcher.spec b/plexus-sec-dispatcher.spec
index 42f63fc..4ae47cd 100644
--- a/plexus-sec-dispatcher.spec
+++ b/plexus-sec-dispatcher.spec
@@ -1,6 +1,12 @@
+# Workaround for rhbz#1969370: __bootstrap macro is not defined in
+# CentOS Stream, See https://bugzilla.redhat.com/1969370
+%global __bootstrap ~bootstrap
+
+%bcond_without bootstrap
+
Name: plexus-sec-dispatcher
Version: 1.4
-Release: 33%{?dist}
+Release: 34%{?dist}
Summary: Plexus Security Dispatcher Component
License: ASL 2.0
URL: https://github.com/codehaus-plexus/plexus-sec-dispatcher
@@ -14,31 +20,33 @@ Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
# Removed maven-compiler-plugin configuration version in the pom as annotations isn't available in version 1.4.
Patch0: %{name}-pom.patch
-BuildRequires: maven-local
+BuildRequires: maven-local-openjdk8
+%if %{with bootstrap}
+BuildRequires: javapackages-bootstrap
+%else
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.codehaus.plexus:plexus-container-default)
-BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
-BuildRequires: mvn(org.sonatype.plexus:plexus-cipher)
-BuildRequires: mvn(org.sonatype.spice:spice-parent:pom:)
+BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-utils)
+BuildRequires: %{?module_prefix}mvn(org.sonatype.plexus:plexus-cipher)
+%endif
%description
Plexus Security Dispatcher Component
-%package javadoc
-Summary: Javadoc for %{name}
-
-%description javadoc
-API documentation for %{name}.
+%{?module_package}
+%{?javadoc_package}
%prep
%setup -q
-
%patch0 -p1
cp %{SOURCE1} .
+%pom_remove_parent
+%pom_xpath_inject "pom:dependency[pom:artifactId='junit']" "test"
+
%mvn_file : plexus/%{name}
%build
@@ -47,15 +55,16 @@ cp %{SOURCE1} .
%install
%mvn_install
-%files -f .mfiles
-%license LICENSE-2.0.txt
-
-%files javadoc -f .mfiles-javadoc
+%files -n %{?module_prefix}%{name} -f .mfiles
%license LICENSE-2.0.txt
%changelog
-* Fri Apr 16 2021 Mohan Boddu - 1.4-33
-- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
+* Tue Jun 08 2021 Mikolaj Izdebski - 1.4-34
+- Bootstrap Maven for CentOS Stream 9
+
+* Mon May 17 2021 Mikolaj Izdebski - 1.4-33
+- Bootstrap build
+- Non-bootstrap build
* Wed Jan 27 2021 Fedora Release Engineering - 1.4-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@@ -69,9 +78,18 @@ cp %{SOURCE1} .
* Thu Jan 30 2020 Fedora Release Engineering - 1.4-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+* Sat Jan 25 2020 Mikolaj Izdebski - 1.4-29
+- Build with OpenJDK 8
+
+* Tue Nov 05 2019 Mikolaj Izdebski - 1.4-28
+- Mass rebuild for javapackages-tools 201902
+
* Fri Jul 26 2019 Fedora Release Engineering - 1.4-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+* Fri May 24 2019 Mikolaj Izdebski - 1.4-27
+- Mass rebuild for javapackages-tools 201901
+
* Sat Feb 02 2019 Fedora Release Engineering - 1.4-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild