Bootstrap Maven as non-modular packages

Resolves: rhbz#1951482
This commit is contained in:
Mikolaj Izdebski 2021-06-08 20:17:56 +02:00
parent 83065f4478
commit 5e5afb6314
2 changed files with 38 additions and 18 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/objenesis-1.2.tar.xz
/2.1.tar.gz
/2.6.tar.gz
/3.0.1.tar.gz
/3.1.tar.gz

View File

@ -1,3 +1,9 @@
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
# CentOS Stream, See https://bugzilla.redhat.com/1969370
%global __bootstrap ~bootstrap
%bcond_without bootstrap
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
@ -31,21 +37,25 @@
Summary: A library for instantiating Java objects
Name: objenesis
Version: 3.1
Release: 6%{?dist}
Release: 7%{?dist}
License: ASL 2.0
URL: http://objenesis.org/
BuildArch: noarch
Source0: https://github.com/easymock/%{name}/archive/%{version}.tar.gz
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
%endif
# xmvn-builddep misses this:
%if %{without bootstrap}
BuildRequires: mvn(org.apache:apache-jar-resource-bundle)
%endif
BuildArch: noarch
%description
Objenesis is a small Java library that serves one purpose: to instantiate
@ -67,7 +77,6 @@ when this is useful:
* Container Frameworks - Objects can be dynamically instantiated in
non-standard ways.
%package javadoc
Summary: Javadoc for %{name}
BuildArch: noarch
@ -75,7 +84,6 @@ BuildArch: noarch
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q
@ -83,33 +91,32 @@ This package contains the API documentation for %{name}.
%pom_xpath_remove pom:addMavenDescriptor
%pom_remove_plugin :maven-timestamp-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin -r :maven-shade-plugin
%pom_xpath_remove "pom:dependency[pom:scope='test']" tck
%pom_xpath_remove pom:build/pom:extensions
# Fix javadoc generation on java 11
%pom_xpath_inject pom:pluginManagement/pom:plugins "<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration><source>1.8</source></configuration>
</plugin>"
%pom_xpath_remove pom:build/pom:extensions
%build
# tests are skipped because of missing dependency spring-osgi-test
%mvn_build -- -Dyear=2009 -Dmaven.test.skip=true
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%doc LICENSE.txt
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%changelog
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1-7
- Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1-6
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -130,9 +137,21 @@ This package contains the API documentation for %{name}.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.1-2
- Mass rebuild for javapackages-tools 201902
* Thu Oct 17 2019 Marian Koncek <mkoncek@redhat.com> - 3.1-1
- Update to upstream version 3.1
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 15 2019 Marian Koncek <mkoncek@redhat.com> - 3.0.1-1
- Update to upstream version 3.0.1
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.6-3
- Mass rebuild for javapackages-tools 201901
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild