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 3959dc01e0
commit a973910f53
2 changed files with 35 additions and 23 deletions

View File

@ -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-cipher
Version: 1.7
Release: 23%{?dist}
Release: 24%{?dist}
Summary: Plexus Cipher: encryption/decryption Component
License: ASL 2.0
# project moved to GitHub and it looks like there is no official website anymore
@ -13,25 +19,27 @@ BuildArch: noarch
# git archive --format tar --prefix=plexus-cipher-1.7/ 0cff29e6b2e | gzip -9 > plexus-cipher-1.7.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRequires: maven-local
BuildRequires: maven-local-openjdk8
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(javax.enterprise:cdi-api)
BuildRequires: mvn(javax.inject:javax.inject)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.sonatype.plugins:sisu-maven-plugin)
BuildRequires: mvn(org.sonatype.spice:spice-parent:pom:)
%endif
%description
Plexus Cipher: encryption/decryption Component
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
API documentation for %{name}.
%{?javadoc_package}
%prep
%setup -q
%pom_remove_parent
%pom_xpath_inject "pom:dependency[pom:artifactId='junit']" "<scope>test</scope>"
# replace %{version}-SNAPSHOT with %{version}
%pom_xpath_replace pom:project/pom:version "<version>%{version}</version>"
@ -42,31 +50,26 @@ API documentation for %{name}.
%pom_add_dep javax.inject:javax.inject:1:provided
%pom_add_dep javax.enterprise:cdi-api:1.0:provided
%pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/*" 1.6
%mvn_file : plexus/%{name}
sed -i -e "s|1.5|1.8|" pom.xml
# Fix javadoc generation on java 11
%pom_xpath_inject pom:build/pom:plugins "<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration><source>1.8</source></configuration>
</plugin>"
%build
# Tests depend on sisu-guice
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
%license LICENSE.txt NOTICE.txt
%changelog
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7-23
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-24
- Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-23
- Bootstrap build
- Non-bootstrap build
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -83,9 +86,18 @@ sed -i -e "s|1.5|1.8|" pom.xml
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-17
- Build with OpenJDK 8
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-16
- Mass rebuild for javapackages-tools 201902
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-15
- Mass rebuild for javapackages-tools 201901
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
052bfc5cab808a1fe012a8f7d840f6b0 plexus-cipher-1.7.tar.gz
SHA512 (plexus-cipher-1.7.tar.gz) = fab57bc55519c29f0d0ae6c37a076d1a00b7ecdae50408705e31595d4dae8fd4a771cfe3b28be2afedc0b89dd5270f4b6abafc0b04019f8e406c667bf2f78bea