Blame SPECS/jersey.spec

5c9032
%global pkg_name jersey
5c9032
%{?scl:%scl_package %{pkg_name}}
5c9032
%global with_grizzly 1
5c9032
# Use jetty 9.1.1.v20140108.
5c9032
%bcond_with jetty
5c9032
%{?java_common_find_provides_and_requires}
5c9032
Name:          %{?scl_prefix}jersey
5c9032
Version:       2.18
5c9032
Release:       3.3%{?dist}
5c9032
Summary:       JAX-RS (JSR 311) production quality Reference Implementation
5c9032
# One file in jersey-core/ is under ASL 2.0 license
5c9032
# https://java.net/jira/browse/JERSEY-2870
5c9032
License:       (CDDL or GPLv2 with exceptions) and ASL 2.0
5c9032
URL:           http://jersey.java.net/
5c9032
Source0:       https://github.com/jersey/jersey/archive/%{version}.tar.gz
5c9032
Source1:       http://www.apache.org/licenses/LICENSE-2.0.txt
5c9032
# Remove repackaged dependencies: guava, atinject
5c9032
Patch0:        jersey-2.18-use-system-libraries.patch
5c9032
# Support fo servlet 3.1 apis
5c9032
Patch1:        jersey-2.17-mvc-jsp-servlet31.patch
5c9032
# Update istack plugin reference
5c9032
Patch2:        jersey-2.17-new-istack-plugin.patch
5c9032
5c9032
BuildRequires: %{?scl_prefix_java_common}maven-local
5c9032
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.core:jackson-annotations)
5c9032
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.jaxrs:jackson-jaxrs-base)
5c9032
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider)
5c9032
BuildRequires: %{?scl_prefix}mvn(com.google.guava:guava)
5c9032
BuildRequires: %{?scl_prefix_maven}mvn(com.sun.istack:istack-commons-maven-plugin)
5c9032
BuildRequires: %{?scl_prefix}mvn(javax.annotation:javax.annotation-api)
5c9032
BuildRequires: %{?scl_prefix_java_common}mvn(javax.inject:javax.inject)
5c9032
BuildRequires: %{?scl_prefix}mvn(javax.ws.rs:javax.ws.rs-api)
5c9032
BuildRequires: %{?scl_prefix}mvn(javax.xml.bind:jaxb-api)
5c9032
BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.httpcomponents:httpclient)
5c9032
BuildRequires: %{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin)
5c9032
BuildRequires: %{?scl_prefix}mvn(org.glassfish.hk2:hk2-api)
5c9032
BuildRequires: %{?scl_prefix}mvn(org.glassfish.hk2:hk2-bom:pom:)
5c9032
BuildRequires: %{?scl_prefix}mvn(org.glassfish.hk2:hk2-locator)
5c9032
BuildRequires: %{?scl_prefix}mvn(org.glassfish.hk2:osgi-resource-locator)
5c9032
5c9032
BuildArch:     noarch
5c9032
5c9032
%description
5c9032
Jersey is the open source JAX-RS (JSR 311)
5c9032
production quality Reference Implementation
5c9032
for building RESTful Web services.
5c9032
5c9032
%package test-framework
5c9032
Summary:       Jersey Test Framework
5c9032
5c9032
%description test-framework
5c9032
%{summary}.
5c9032
5c9032
%package javadoc
5c9032
Summary:       Javadoc for %{pkg_name}
5c9032
5c9032
%description javadoc
5c9032
This package contains javadoc for %{pkg_name}.
5c9032
5c9032
%prep
5c9032
5c9032
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
5c9032
%setup -q -n %{pkg_name}-%{version}
5c9032
find . -name "*.jar" -print -delete
5c9032
find . -name "*.class" -print -delete
5c9032
5c9032
%patch0 -p1
5c9032
%patch1 -p1
5c9032
%patch2 -p1
5c9032
5c9032
cp -p %{SOURCE1} .
5c9032
sed -i 's/\r//' LICENSE-2.0.txt
5c9032
5c9032
sed -i '/setConnectionManagerShared/ d' connectors/apache-connector/src/main/java/org/glassfish/jersey/apache/connector/ApacheConnector.java
5c9032
sed -i '/CONNECTION_MANAGER_SHARED/ d' connectors/apache-connector/src/main/java/org/glassfish/jersey/apache/connector/ApacheConnector.java
5c9032
5c9032
%pom_xpath_remove pom:build/pom:extensions
5c9032
5c9032
%pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-javadoc-plugin' ]/pom:executions"
5c9032
%pom_remove_plugin :maven-checkstyle-plugin
5c9032
5c9032
# Add OSGi manifest required by docker-client
5c9032
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 connectors/apache-connector '
5c9032
<executions>
5c9032
  <execution>
5c9032
    <id>bundle-manifest</id>
5c9032
    <phase>process-classes</phase>
5c9032
    <goals>
5c9032
      <goal>manifest</goal>
5c9032
    </goals>
5c9032
  </execution>
5c9032
</executions>'
5c9032
5c9032
# Disable modules we do not need
5c9032
%pom_disable_module bundles
5c9032
%pom_disable_module grizzly-connector connectors
5c9032
%pom_disable_module jetty-connector connectors
5c9032
%pom_disable_module jaxb media
5c9032
%pom_disable_module json-jackson1 media
5c9032
%pom_disable_module json-jettison media
5c9032
%pom_disable_module json-processing media
5c9032
%pom_disable_module moxy media
5c9032
%pom_disable_module multipart media
5c9032
%pom_disable_module sse media
5c9032
%pom_disable_module archetypes
5c9032
%pom_disable_module containers
5c9032
%pom_disable_module core-server
5c9032
%pom_disable_module examples
5c9032
%pom_disable_module bean-validation ext
5c9032
%pom_disable_module cdi ext
5c9032
%pom_disable_module metainf-services ext
5c9032
%pom_disable_module mvc ext
5c9032
%pom_disable_module mvc-bean-validation ext
5c9032
%pom_disable_module mvc-freemarker ext
5c9032
%pom_disable_module mvc-jsp ext
5c9032
%pom_disable_module mvc-mustache ext
5c9032
%pom_disable_module proxy-client ext
5c9032
%pom_disable_module rx ext
5c9032
%pom_disable_module servlet-portability ext
5c9032
%pom_disable_module spring3 ext
5c9032
%pom_disable_module wadl-doclet ext
5c9032
%pom_disable_module incubator
5c9032
%pom_disable_module security
5c9032
%pom_disable_module test-framework
5c9032
%pom_disable_module tests
5c9032
# TODO: Ugly way to disable profile-defined module
5c9032
sed -i '/rx-client-java8/ d' pom.xml
5c9032
5c9032
%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin
5c9032
%pom_remove_plugin org.codehaus.mojo:buildnumber-maven-plugin core-common
5c9032
5c9032
%pom_xpath_remove "pom:dependency[pom:scope = 'test' ]" connectors/apache-connector
5c9032
%pom_xpath_remove "pom:dependency[pom:scope = 'test' ]" ext/entity-filtering
5c9032
5c9032
# Avoid building jersey-server
5c9032
sed -i '/ServerScopeProvider/ d' ext/entity-filtering/src/main/java/org/glassfish/jersey/message/filtering/EntityFilteringFeature.java
5c9032
sed -i '/SecurityEntityFilteringFeature/ d' ext/entity-filtering/src/main/java/org/glassfish/jersey/message/filtering/EntityFilteringFeature.java
5c9032
5c9032
%pom_remove_dep :jersey-server ext/entity-filtering
5c9032
for f in ServerScopeProvider SecurityEntityFilteringFeature SecurityServerScopeProvider; do
5c9032
  rm -f ext/entity-filtering/src/main/java/org/glassfish/jersey/message/filtering/$f.java
5c9032
done
5c9032
5c9032
# Conflict with org.glassfish.jersey:project
5c9032
%mvn_file "org.glassfish.jersey.connectors:project" %{pkg_name}/connectors-project
5c9032
%mvn_file "org.glassfish.jersey.ext:project" %{pkg_name}/ext-project
5c9032
%mvn_file "org.glassfish.jersey.media:project" %{pkg_name}/media-project
5c9032
5c9032
%{?scl:EOF}
5c9032
5c9032
%build
5c9032
5c9032
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
5c9032
5c9032
%mvn_build -- -Dmaven.test.skip=true
5c9032
5c9032
%{?scl:EOF}
5c9032
5c9032
%install
5c9032
5c9032
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
5c9032
%mvn_install
5c9032
5c9032
%{?scl:EOF}
5c9032
5c9032
%files -f .mfiles
5c9032
%doc README.md LICENSE.html LICENSE.txt LICENSE-2.0.txt etc/config/copyright.txt
5c9032
%dir %{_javadir}/jersey
5c9032
%dir %{_mavenpomdir}/jersey
5c9032
5c9032
%files javadoc -f .mfiles-javadoc
5c9032
%doc LICENSE.html LICENSE.txt LICENSE-2.0.txt etc/config/copyright.txt
5c9032
5c9032
%changelog
5c9032
* Tue Jul 28 2015 Alexander Kurtakov <akurtako@redhat.com> 2.18-3.3
5c9032
- Drop provides/obsoletes outside of dts namespace.
5c9032
5c9032
* Mon Jul 20 2015 Mat Booth <mat.booth@redhat.com> - 2.18-3.2
5c9032
- Fix unowned directories
5c9032
5c9032
* Tue Jul 14 2015 Roland Grunberg <rgrunber@redhat.com> - 2.18-3.1
5c9032
- SCL-ize.
5c9032
5c9032
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18-3
5c9032
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5c9032
5c9032
* Wed Jun 10 2015 gil cattaneo <puntogil@libero.it> 2.18-2
5c9032
- built with new mimepull rhbz#1189216
5c9032
5c9032
* Tue Jun 09 2015 gil cattaneo <puntogil@libero.it> 2.18-1
5c9032
- update to 2.18
5c9032
- remove Obsolete duplicate declaration
5c9032
5c9032
* Sun Jun  7 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.17-4
5c9032
- Obsolete jersey-contribs
5c9032
5c9032
* Fri May 29 2015 gil cattaneo <puntogil@libero.it> 2.17-3
5c9032
- remove javax.el:el-api exclusions RHBZ#1223468
5c9032
5c9032
* Fri May 29 2015 gil cattaneo <puntogil@libero.it> 2.17-2
5c9032
- generated apache-connector OSGi manifest
5c9032
5c9032
* Fri May 08 2015 gil cattaneo <puntogil@libero.it> 2.17-1
5c9032
- update to 2.17
5c9032
5c9032
* Tue Jan 27 2015 gil cattaneo <puntogil@libero.it> 1.18.3-1
5c9032
- update to 1.18.3
5c9032
- introduce license macro
5c9032
5c9032
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.17.1-11
5c9032
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5c9032
5c9032
* Thu Jun 05 2014 gil cattaneo <puntogil@libero.it> 1.17.1-10
5c9032
- fix javax.el apis
5c9032
5c9032
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 1.17.1-9
5c9032
- Use Requires: java-headless rebuild (#1067528)
5c9032
5c9032
* Mon Nov 18 2013 gil cattaneo <puntogil@libero.it> 1.17.1-8
5c9032
- use objectweb-asm3
5c9032
5c9032
* Tue Oct 15 2013 gil cattaneo <puntogil@libero.it> 1.17.1-7
5c9032
- Do not install source jars
5c9032
5c9032
* Tue Oct 15 2013 gil cattaneo <puntogil@libero.it> 1.17.1-6
5c9032
- fix for rhbz#1019234
5c9032
5c9032
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.17.1-5
5c9032
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5c9032
5c9032
* Wed Jul 10 2013 gil cattaneo <puntogil@libero.it> 1.17.1-4
5c9032
- switch to XMvn
5c9032
- minor changes to adapt to current guideline
5c9032
- fix aId for new istack-commons maven plugin
5c9032
5c9032
* Sat Apr 27 2013 gil cattaneo <puntogil@libero.it> 1.17.1-3
5c9032
- rebuilt with grizzly support
5c9032
5c9032
* Thu Mar 28 2013 gil cattaneo <puntogil@libero.it> 1.17.1-2
5c9032
- fixed license field
5c9032
- installed ASL license txt file
5c9032
5c9032
* Mon Mar 18 2013 gil cattaneo <puntogil@libero.it> 1.17.1-1
5c9032
- update to 1.17.1
5c9032
5c9032
* Tue Jan 22 2013 gil cattaneo <puntogil@libero.it> 1.17-1
5c9032
- update to 1.17
5c9032
5c9032
* Fri Jan 11 2013 gil cattaneo <puntogil@libero.it> 1.16-1
5c9032
- update to 1.16
5c9032
5c9032
* Mon Nov 19 2012 gil cattaneo <puntogil@libero.it> 1.15-1
5c9032
- update to 1.15
5c9032
5c9032
* Tue Sep 18 2012 gil cattaneo <puntogil@libero.it> 1.14-1
5c9032
- update to 1.14
5c9032
5c9032
* Sat Jul 21 2012 gil cattaneo <puntogil@libero.it> 1.13-1
5c9032
- update to 1.13
5c9032
5c9032
* Fri May 25 2012 gil cattaneo <puntogil@libero.it> 1.12-1
5c9032
- initial rpm