%global namedreltag %{nil}
%global namedversion %{version}%{?namedreltag}
Name: shrinkwrap
Version: 1.1.2
Release: 7%{?dist}
Summary: A simple mechanism to assemble Java archives
License: ASL 2.0
Url: http://www.jboss.org/shrinkwrap/
Source0: https://github.com/shrinkwrap/shrinkwrap/archive/%{namedversion}.tar.gz
# remove env.JAVA"x"_HOME
# malformed pom file, not able to use pom macros
Patch0: %{name}-%{namedversion}-remove-enforcer-requireProperty.patch
BuildRequires: mvn(org.jboss:jboss-parent:pom:)
BuildRequires: mvn(org.jboss.apiviz:apiviz)
BuildRequires: mvn(junit:junit)
BuildRequires: maven-local
#BuildRequires: maven-checkstyle-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-source-plugin
# required by enforcer-plugin
BuildRequires: mvn(org.apache.maven.shared:maven-common-artifact-filters)
BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:)
BuildArch: noarch
%description
Shrinkwrap provides a simple mechanism to assemble archives
like JARs, WARs, and EARs with a friendly, fluent API.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{namedversion}
%patch0 -p0
%pom_disable_module dist
# remove env.JAVA"x"_HOME
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-compiler-plugin']/pom:configuration/pom:executable"
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-surefire-plugin']/pom:configuration/pom:jvm" api
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-compiler-plugin']/pom:configuration/pom:executable" api-nio2
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-compiler-plugin']/pom:configuration/pom:executable" impl-nio2
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-surefire-plugin']/pom:configuration/pom:jvm" impl-base
%pom_xpath_remove "pom:profiles" impl-base
# [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.12:check
# (checkstyle-report) on project shrinkwrap-api: Failed during checkstyle configuration:
# cannot initialize module TreeWalker - Unable to instantiate RedundantThrows:
# Unable to instantiate RedundantThrowsCheck
%pom_remove_plugin :maven-checkstyle-plugin
%pom_remove_plugin :maven-checkstyle-plugin api
%pom_remove_plugin :maven-checkstyle-plugin api-nio2
%pom_remove_plugin :maven-checkstyle-plugin impl-base
%pom_remove_plugin :maven-checkstyle-plugin impl-nio2
%pom_remove_plugin :maven-checkstyle-plugin spi
sed -i 's/\r//' LICENSE
%mvn_file :%{name}-api %{name}/api
%mvn_file :%{name}-api-nio2 %{name}/api-nio2
%mvn_file :%{name}-build-resources %{name}/build-resources
%mvn_file :%{name}-impl-base %{name}/impl-base
%mvn_file :%{name}-impl-nio2 %{name}/impl-nio2
%mvn_file :%{name}-spi %{name}/spi
%mvn_package :%{name}-api::tests:
%mvn_package :%{name}-impl-base::tests:
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%dir %{_javadir}/%{name}
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Feb 11 2015 gil cattaneo <puntogil@libero.it> 1.1.2-6
- introduce license macro
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 1.1.2-4
- Use Requires: java-headless rebuild (#1067528)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 02 2013 gil cattaneo <puntogil@libero.it> 1.1.2-2
- build with XMvn
- minor changes to adapt to current guideline
* Tue May 07 2013 gil cattaneo <puntogil@libero.it> 1.1.2-1
- update to 1.1.2
* Tue Feb 19 2013 gil cattaneo <puntogil@libero.it> 1.0.0-5
- set java.home for enforcer-plugin
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.0.0-3
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Apr 21 2012 gil cattaneo <puntogil@libero.it> 1.0.0-1
- initial rpm