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 efcc9f5b30
commit 71dffeca98

View File

@ -1,23 +1,27 @@
%global srcname common-annotations-api # 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: jakarta-annotations Name: jakarta-annotations
Version: 1.3.5 Version: 1.3.5
Release: 8%{?dist} Release: 10%{?dist}
Summary: Jakarta Annotations Summary: Jakarta Annotations
License: EPL-2.0 or GPLv2 with exceptions License: EPL-2.0 or GPLv2 with exceptions
URL: https://github.com/eclipse-ee4j/common-annotations-api URL: https://github.com/eclipse-ee4j/common-annotations-api
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
Source0: https://github.com/eclipse-ee4j/common-annotations-api/archive/%{version}/common-annotations-api-%{version}.tar.gz
BuildRequires: maven-local BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.glassfish.build:spec-version-maven-plugin) %endif
# renamed in fedora 33, remove in fedora 35
Obsoletes: glassfish-annotation-api < 1.3.5-1
Provides: glassfish-annotation-api = %{version}-%{release} Provides: glassfish-annotation-api = %{version}-%{release}
%description %description
@ -25,12 +29,10 @@ Jakarta Annotations defines a collection of annotations representing
common semantic concepts that enable a declarative style of programming common semantic concepts that enable a declarative style of programming
that applies across a variety of Java technologies. that applies across a variety of Java technologies.
%{?javadoc_package}
%javadoc_package
%prep %prep
%setup -q -n %{srcname}-%{version} %setup -q -n common-annotations-api-%{version}
# remove unnecessary dependency on parent POM # remove unnecessary dependency on parent POM
# org.eclipse.ee4j:project is not packaged and isn't needed # org.eclipse.ee4j:project is not packaged and isn't needed
@ -44,6 +46,7 @@ that applies across a variety of Java technologies.
%pom_remove_plugin :maven-javadoc-plugin api %pom_remove_plugin :maven-javadoc-plugin api
%pom_remove_plugin :maven-source-plugin api %pom_remove_plugin :maven-source-plugin api
%pom_remove_plugin :findbugs-maven-plugin api %pom_remove_plugin :findbugs-maven-plugin api
%pom_remove_plugin :spec-version-maven-plugin api
# provide aliases for the old artifact coordinates # provide aliases for the old artifact coordinates
%mvn_alias jakarta.annotation:jakarta.annotation-api \ %mvn_alias jakarta.annotation:jakarta.annotation-api \
@ -53,19 +56,23 @@ that applies across a variety of Java technologies.
%build %build
%mvn_build %mvn_build
%install %install
%mvn_install %mvn_install
%files -f .mfiles %files -f .mfiles
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%doc README.md %doc README.md
%changelog %changelog
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.5-8 * Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.5-10
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Bootstrap Maven for CentOS Stream 9
* Wed May 26 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.5-9
- Re-add provides on glassfish-annotation-api
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.5-8
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-7 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild