File maven-compiler-plugin.spec of Package maven-compiler-plugin

# spec file for package maven-compiler-plugin
# Copyright (c) 2019 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%bcond_with bootstrap
%global base_name maven-compiler-plugin
Version:        3.8.1
Release:        0
Summary:        Maven Compiler Plugin
License:        Apache-2.0
Group:          Development/Libraries/Java
Source1:        %{base_name}-build.xml
Patch0:         %{base_name}-bootstrap-resources.patch
Patch1:         00-plexus-languages-1.0.patch
BuildRequires:  fdupes
BuildRequires:  javapackages-local
BuildRequires:  maven-lib
BuildRequires:  maven-plugin-annotations
BuildRequires:  maven-shared-incremental
BuildRequires:  maven-shared-utils
BuildRequires:  plexus-compiler
BuildRequires:  plexus-languages
BuildRequires:  unzip
BuildRequires:  xmvn-install
BuildRequires:  xmvn-resolve
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugins:pom:)
BuildArch:      noarch
%if %{with bootstrap}
Name:           %{base_name}-bootstrap
BuildRequires:  ant
Name:           %{base_name}
BuildRequires:  xmvn
BuildRequires:  mvn(org.apache.maven.plugins:maven-compiler-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-jar-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-resources-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-surefire-plugin)
BuildRequires:  mvn(org.codehaus.plexus:plexus-component-metadata)
Obsoletes:      %{base_name}-bootstrap
#!BuildRequires: maven-compiler-plugin-bootstrap
#!BuildRequires: maven-jar-plugin-bootstrap
#!BuildRequires: maven-javadoc-plugin-bootstrap
#!BuildRequires: maven-plugin-plugin-bootstrap
#!BuildRequires: maven-resources-plugin-bootstrap
#!BuildRequires: maven-surefire-plugin-bootstrap

The Compiler Plugin is used to compile the sources of your project.

%if %{without bootstrap}
%package javadoc
Summary:        Javadoc for %{name}
Group:          Documentation/HTML

%description javadoc
API documentation for %{name}.

%setup -q -n %{base_name}-%{version}
%if %{with bootstrap}
cp %{SOURCE1} build.xml
%patch0 -p1
%patch1 -p1

%pom_remove_dep :::test

%if %{with bootstrap}
mkdir -p lib
build-jar-repository -s lib \
	maven/maven-artifact \
	maven/maven-core \
	maven/maven-model \
	maven/maven-plugin-api \
	maven-plugin-tools/maven-plugin-annotations \
	maven-shared-incremental/maven-shared-incremental \
	maven-shared-utils/maven-shared-utils \
	plexus-compiler/plexus-compiler-api \
	plexus-compiler/plexus-compiler-javac \
	plexus-compiler/plexus-compiler-manager \
%{ant} -Dtest.skip=true jar
xmvn --batch-mode --offline \
	-Dmaven.test.skip=true \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
	-Dmaven.compiler.release=7 \
	package org.apache.maven.plugins:maven-javadoc-plugin:aggregate

%{mvn_artifact} pom.xml target/%{base_name}-%{version}.jar

%fdupes -s %{buildroot}%{_javadocdir}

%files -f .mfiles

%if %{without bootstrap}
%files javadoc -f .mfiles-javadoc