Accepting request 687557 from Java:packages

OBS-URL: https://build.opensuse.org/request/show/687557
OBS-URL: https://build.opensuse.org/package/show/Java:packages/xmvn?expand=0&rev=10
This commit is contained in:
Fridrich Strba 2019-03-22 09:50:52 +00:00 committed by Git OBS Bridge
parent e658584c29
commit 45385adc30
3 changed files with 137 additions and 5 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d34b10d7dbb24a99f9f9a9f29aa7cc80f22ef09e70c0fc01bdc69e43db98ccc2
size 4532
oid sha256:0dace58e4a650684736c135d1b50e5530cd16b97f6ff4580e5648871293af50a
size 4676

132
xmvn-connector-ivy.spec Normal file
View File

@ -0,0 +1,132 @@
#
# spec file for package xmvn
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 https://bugs.opensuse.org/
#
%global parent xmvn
%global subname connector-ivy
%bcond_with tests
Name: %{parent}-%{subname}
Version: 3.0.0
Release: 0
Summary: XMvn Connector for Apache Ivy
License: Apache-2.0
Group: Development/Tools/Building
BuildArch: noarch
URL: https://fedora-java.github.io/xmvn/
Source0: https://github.com/fedora-java/%{parent}/releases/download/%{version}/%{parent}-%{version}.tar.xz
Source1: %{parent}-build.tar.xz
Patch0: 0001-Fix-installer-plugin-loading.patch
Patch1: 0001-Port-to-Gradle-4.2.patch
Patch2: 0001-Port-to-Gradle-4.3.1.patch
Patch3: 0001-Support-setting-Xdoclint-none-in-m-javadoc-p-3.0.0.patch
Patch4: 0001-Fix-configuration-of-aliased-plugins.patch
Patch5: 0001-Don-t-use-JAXB-for-converting-bytes-to-hex-string.patch
Patch6: 0001-Use-apache-commons-compress-for-manifest-injection-a.patch
Patch7: 0001-port-to-gradle-4.4.1.patch
Patch8: 0001-Replace-JAXB-parser.patch
BuildRequires: %{parent}-api = %{version}
BuildRequires: ant fdupes
BuildRequires: apache-ivy
BuildRequires: javapackages-local
BuildRequires: slf4j
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
%description
This package provides XMvn MOJO, which is a Maven plugin that consists
of several MOJOs. Some goals of these MOJOs are intended to be
attached to default Maven lifecycle when building packages, others can
be called directly from Maven command line.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n %{parent}-%{version} -a1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
# Resolver IT won't work either - it tries to execute JAR file, which
# relies on Class-Path in manifest, which is forbidden in Fedora...
find -name ResolverIntegrationTest.java -delete
%pom_remove_plugin -r :maven-site-plugin
%{mvn_package} ":xmvn{,-it}" __noinstall
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# FIXME pom macros don't seem to support submodules in profile
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
pushd %{name}
%{mvn_file} :{*} %{parent}/@1
popd
%build
mkdir -p lib
build-jar-repository -s lib \
ivy slf4j/api %{parent}/%{parent}-api
pushd %{name}
%ant \
%if %{without tests}
-Dtest.skip=true \
%endif
package javadoc
%mvn_artifact pom.xml target/%{name}-%{version}.jar
popd
%install
pushd %{name}
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f %{name}/.mfiles
%license LICENSE NOTICE
%doc AUTHORS README.md
%files javadoc -f %{name}/.mfiles-javadoc
%license LICENSE NOTICE
%changelog

View File

@ -138,11 +138,11 @@ This package provides XMvn Install, which is a command-line interface
to XMvn installer. The installer reads reactor metadata and performs
artifact installation according to specified configuration.
%package -n %{parent}-javadoc
%package -n javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description -n %{parent}-javadoc
%description -n javadoc
This package provides %{summary}.
%prep
@ -264,7 +264,7 @@ done
%files -n %{parent}-install -f .mfiles-install
%{_bindir}/%{parent}-install
%files -n %{parent}-javadoc
%files -n javadoc
%license LICENSE NOTICE
%{_javadocdir}/%{parent}