File shrinkwrap.spec of Package shrinkwrap
#
# spec file for package shrinkwrap
#
# 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/
#
Name: shrinkwrap
Version: 1.2.3
Release: 0
Summary: A simple mechanism to assemble Java archives
License: Apache-2.0
URL: http://arquillian.org/modules/shrinkwrap-shrinkwrap/
Source0: https://github.com/shrinkwrap/shrinkwrap/archive/%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin)
BuildRequires: mvn(org.jboss:jboss-parent:pom:)
#!BuildRequires: jgit
BuildArch: noarch
%if 0%{?suse_version} > 1500
BuildRequires: mvn(javax.xml.bind:jaxb-api)
%endif
%description
Shrinkwrap provides a simple mechanism to assemble archives
like JARs, WARs, and EARs with a friendly, fluent API.
%package api-nio2
Summary: ShrinkWrap NIO.2 API
License: Apache-2.0
%description api-nio2
ShrinkWrap NIO.2 API.
%package bom
Summary: ShrinkWrap Bill of Materials
License: Apache-2.0
%description bom
Centralized dependencyManagement for the ShrinkWrap Project.
%package build-resources
Summary: Shrinkwrap Build Resources
License: Apache-2.0
%description build-resources
Shrinkwrap Build Resources.
%package depchain
Summary: ShrinkWrap Dependency Chain
License: Apache-2.0
%description depchain
Single-POM Definition to export the
ShrinkWrap artifacts in proper scope.
%package depchain-java7
Summary: ShrinkWrap Dependency Chain for Java7 Environments
License: Apache-2.0
%description depchain-java7
Single-POM Definition to export the
ShrinkWrap artifacts in proper scope
for Java 7 Environments.
%package impl-base
Summary: ShrinkWrap Implementation Base
License: Apache-2.0 AND SUSE-Public-Domain
%description impl-base
Common Base for Implementations of the ShrinkWrap Project.
%package impl-nio2
Summary: ShrinkWrap NIO.2 Implementation
License: Apache-2.0
%description impl-nio2
ShrinkWrap NIO.2 Implementation.
%package parent
Summary: ShrinkWrap Aggregator and Build Parent
License: Apache-2.0
%description parent
ShrinkWrap Aggregator POM.
%package spi
Summary: ShrinkWrap SPI
License: Apache-2.0
%description spi
Generic Service Provider Contract of the ShrinkWrap Project.
%package javadoc
Summary: Javadoc for %{name}
License: Apache-2.0
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}
%pom_disable_module dist
# remove env.JAVA"x"_HOME
%pom_xpath_remove "pom:requireProperty"
# Option UseSplitVerifier support was removed in 8.0
# <argLine>-XX:-UseSplitVerifier</argLine>
%pom_xpath_remove "pom:configuration/pom:argLine"
%pom_xpath_remove "pom:configuration/pom:jvm" api
%pom_xpath_remove "pom:configuration/pom:jvm" impl-base
%pom_xpath_remove "pom:profiles" impl-base
%pom_xpath_remove "pom:compilerArguments"
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r org.eclipse.m2e:lifecycle-mapping
%pom_remove_plugin -r :maven-compiler-plugin
%if 0%{?suse_version} > 1500
# add the jaxb-api dependency
%pom_add_dep javax.xml.bind:jaxb-api impl-base
%endif
# Convert from dos to unix line ending
sed -i.orig 's|\r||g' LICENSE
touch -r LICENSE.orig LICENSE
rm LICENSE.orig
%{mvn_package} :%{name}-api::tests: %{name}-api
%{mvn_package} :%{name}-impl-base::tests: %{name}-impl-base
%build
%{mvn_build} -s -f -- \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
-Dmaven.compiler.release=8 \
%endif
-Dsource=8
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles-%{name}-api
%license LICENSE
%files api-nio2 -f .mfiles-%{name}-api-nio2
%files impl-base -f .mfiles-%{name}-impl-base
%files impl-nio2 -f .mfiles-%{name}-impl-nio2
%files spi -f .mfiles-%{name}-spi
%files bom -f .mfiles-%{name}-bom
%license LICENSE
%files build-resources -f .mfiles-%{name}-build-resources
%license LICENSE
%files depchain -f .mfiles-%{name}-depchain
%license LICENSE
%files depchain-java7 -f .mfiles-%{name}-depchain-java7
%license LICENSE
%files parent -f .mfiles-%{name}-parent
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog