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 04bc86be62
commit 2afc6b009a
3 changed files with 49 additions and 61 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
/LICENSE-2.0.txt
/noarch
/*.src.rpm
/1.0.1.tar.gz
/1.0.3.tar.gz

View File

@ -1,26 +1,25 @@
# 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: atinject
Version: 1
Release: 37.20100611svn86%{?dist}
Version: 1.0.3
Release: 3%{?dist}
Summary: Dependency injection specification for Java (JSR-330)
License: ASL 2.0
URL: http://code.google.com/p/atinject/
URL: https://github.com/eclipse-ee4j/injection-api
BuildArch: noarch
# latest release doesn't generate javadocs and there is no source
# tarball with pom.xml or ant build file
#
# svn export -r86 http://atinject.googlecode.com/svn/trunk atinject-1
# rm -rf atinject-1/{lib,javadoc}/
# tar caf atinject-1.tar.xz atinject-1
Source0: %{name}-%{version}.tar.xz
# These manifests based on the ones shipped by eclipse.org
Source1: MANIFEST.MF
Source2: MANIFEST-TCK.MF
Source3: http://www.apache.org/licenses/LICENSE-2.0.txt
Source0: https://github.com/eclipse-ee4j/injection-api/archive/%{version}.tar.gz
BuildRequires: javapackages-local
BuildRequires: java-devel
BuildRequires: junit
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
%endif
%description
This package specifies a means for obtaining objects in such a way as
@ -29,64 +28,40 @@ traditional approaches such as constructors, factories, and service
locators (e.g., JNDI). This process, known as dependency injection, is
beneficial to most nontrivial applications.
%package tck
Summary: TCK for testing %{name} compatibility with JSR-330
Requires: %{name} = %{version}-%{release}
Requires: junit
%description tck
%{summary}.
%{?javadoc_package}
%prep
%setup -q
cp %{SOURCE3} LICENSE
mkdir lib
build-jar-repository -p lib junit
%setup -q -n injection-api-%{version}
# Fix dep in TCK pom
sed -i -e 's/pom\.groupId/project.groupId/' tck-pom.xml
%pom_remove_parent
%pom_remove_plugin -r :maven-javadoc-plugin
# J2EE API symlinks
%mvn_file :javax.inject atinject javax.inject/atinject
# TCK sub-package
%mvn_file :javax.inject-tck atinject-tck
%mvn_package :javax.inject-tck tck
%mvn_alias : javax.inject:javax.inject
%mvn_file : atinject
%build
set -e
alias rm=:
alias xargs=:
alias javac="javac -source 1.8 -target 1.8"
alias javadoc="javadoc -source 1.8 -Xdoclint:none"
. ./build.sh
# Inject OSGi manifests required by Eclipse.
jar umf %{SOURCE1} build/dist/javax.inject.jar
jar umf %{SOURCE2} build/tck/dist/javax.inject-tck.jar
%mvn_artifact pom.xml build/dist/javax.inject.jar
%mvn_artifact tck-pom.xml build/tck/dist/javax.inject-tck.jar
mv build/tck/javadoc build/javadoc/tck
%mvn_build
%install
%mvn_install -J build/javadoc
%mvn_install
%files -f .mfiles
%license LICENSE
%files tck -f .mfiles-tck
%files -n %{?module_prefix}%{name} -f .mfiles
%license LICENSE.txt NOTICE.md
%changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1-37.20100611svn86
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.3-3
- Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.3-2
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1-36.20100611svn86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 05 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.3-1
- Update to upstream version 1.0.3
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1-35.20100611svn86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
@ -96,12 +71,24 @@ mv build/tck/javadoc build/javadoc/tck
* Sat Jun 20 2020 Mat Booth <mat.booth@redhat.com> - 1-33.20100611svn86
- Allow building against Java 11
* Sat May 16 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.1-1
- Update to upstream version 1.0.1
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1-32.20100611svn86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1-31.20100611svn86
- Build with OpenJDK 8
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1-30.20100611svn86
- Mass rebuild for javapackages-tools 201902
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1-31.20100611svn86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1-29.20100611svn86
- Mass rebuild for javapackages-tools 201901
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1-30.20100611svn86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1,2 +1 @@
5ed77767af2fa4ba8ef66c3e966bd2b2 atinject-1.tar.xz
3b83ef96387f14655fc854ddc3c6bd57 LICENSE-2.0.txt
SHA512 (1.0.3.tar.gz) = 394fefb51a8bc5e793870b9899bf2f946c2cb4d5a5d377e4bc8e8668c4b4419dd2afddbbf3bf3d0e3202625b60ff545671f363d927a8c6c3d09387ba519c29a4