Only remove the maven-javadoc-plugin configuration on EPEL 8

Add source version to javadoc configuration (backported from git)
This commit is contained in:
Mattias Ellert 2020-05-06 01:24:17 +02:00
commit 823730ac2f
2 changed files with 41 additions and 4 deletions

View file

@ -1,6 +1,6 @@
Name: voms-api-java
Version: 3.3.0
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Virtual Organization Membership Service Java API
License: ASL 2.0
@ -8,6 +8,9 @@ URL: https://wiki.italiangrid.it/VOMS
Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
# Disable tests using non-local network interface
Patch0: %{name}-no-local.patch
# Add source version to javadoc configuration
# Backported from upstream git
Patch1: %{name}-javadoc-source.patch
BuildArch: noarch
BuildRequires: maven-local
@ -36,14 +39,20 @@ Virtual Organization Membership Service (VOMS) Java API Documentation.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Remove unused dependency
%pom_remove_dep net.jcip:jcip-annotations
# Remove maven-javadoc-plugin configuration
# It doesn't change the content of the javadoc package anyway
# And its presence causes the EPEL 8 build to fail
# Use default location for javadoc output
%pom_xpath_remove "//pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:configuration/pom:outputDirectory"
%pom_xpath_remove "//pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:configuration/pom:reportOutputDirectory"
%if %{?rhel}%{!?rhel:0} == 8
# EPEL 8 doesn't use the maven-javadoc-plugin to generate javadoc
# Remove maven-javadoc-plugin configuration to avoid build failure
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
%endif
# Do not create source jars
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
@ -69,6 +78,10 @@ Virtual Organization Membership Service (VOMS) Java API Documentation.
%license LICENSE
%changelog
* Tue May 05 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.0-8
- Only remove the maven-javadoc-plugin configuration on EPEL 8
- Add source version to javadoc configuration (backported from git)
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild