d483ad
%bcond_without     memcached
d483ad
%bcond_without     ehcache
d483ad
d483ad
Name:              httpcomponents-client
d483ad
Summary:           HTTP agent implementation based on httpcomponents HttpCore
d483ad
Version:           4.5.5
d483ad
Release:           4%{?dist}
d483ad
License:           ASL 2.0
d483ad
URL:               http://hc.apache.org/
d483ad
Source0:           http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
d483ad
d483ad
Patch0:            0001-Use-system-copy-of-effective_tld_names.dat.patch
d483ad
d483ad
BuildArch:         noarch
d483ad
d483ad
BuildRequires:     maven-local
d483ad
BuildRequires:     mvn(commons-codec:commons-codec)
d483ad
BuildRequires:     mvn(commons-logging:commons-logging)
d483ad
BuildRequires:     mvn(junit:junit)
d483ad
%if %{with ehcache}
d483ad
BuildRequires:     mvn(net.sf.ehcache:ehcache-core)
d483ad
%endif
d483ad
%if %{with memcached}
d483ad
BuildRequires:     mvn(net.spy:spymemcached)
d483ad
%endif
d483ad
BuildRequires:     mvn(org.apache.felix:maven-bundle-plugin)
d483ad
BuildRequires:     mvn(org.apache.httpcomponents:httpcore)
d483ad
BuildRequires:     mvn(org.apache.httpcomponents:project:pom:)
d483ad
BuildRequires:     mvn(org.codehaus.mojo:build-helper-maven-plugin)
d483ad
BuildRequires:     mvn(org.easymock:easymock)
d483ad
BuildRequires:     mvn(org.mockito:mockito-core)
d483ad
d483ad
BuildRequires:     publicsuffix-list
d483ad
Requires:          publicsuffix-list
d483ad
d483ad
Obsoletes:         %{name}-tests < 4.4
d483ad
d483ad
%description
d483ad
HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on
d483ad
httpcomponents HttpCore. It also provides reusable components for
d483ad
client-side authentication, HTTP state management, and HTTP connection
d483ad
management. HttpComponents Client is a successor of and replacement
d483ad
for Commons HttpClient 3.x. Users of Commons HttpClient are strongly
d483ad
encouraged to upgrade.
d483ad
d483ad
%package        cache
d483ad
Summary:        Cache module for %{name}
d483ad
d483ad
%description    cache
d483ad
This package provides client side caching for %{name}.
d483ad
d483ad
%package        javadoc
d483ad
Summary:        API documentation for %{name}
d483ad
d483ad
%description    javadoc
d483ad
%{summary}.
d483ad
d483ad
%prep
d483ad
%setup -q -n %{name}-%{version}
d483ad
%patch0 -p1
d483ad
d483ad
%mvn_package :httpclient-cache cache
d483ad
d483ad
# Remove optional build deps not available in Fedora
d483ad
%pom_disable_module httpclient-osgi
d483ad
%pom_disable_module httpclient-win
d483ad
%pom_remove_plugin :docbkx-maven-plugin
d483ad
%pom_remove_plugin :clirr-maven-plugin
d483ad
%pom_remove_plugin :maven-checkstyle-plugin
d483ad
%pom_remove_plugin :apache-rat-plugin
d483ad
%pom_remove_plugin :maven-source-plugin
d483ad
%pom_remove_plugin :maven-javadoc-plugin
d483ad
d483ad
# Fails due to strict crypto policy - uses DSA in test data
d483ad
rm httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java
d483ad
d483ad
# Don't compile/run httpclient-cache tests - they are incompatible with EasyMock 3.3
d483ad
%pom_remove_plugin org.apache.maven.plugins:maven-jar-plugin httpclient-cache
d483ad
%pom_remove_dep org.easymock:easymockclassextension
d483ad
for dep in org.easymock:easymockclassextension org.slf4j:slf4j-jcl; do
d483ad
    %pom_remove_dep $dep httpclient-cache
d483ad
done
d483ad
rm -rf httpclient-cache/src/test
d483ad
d483ad
%pom_remove_plugin :download-maven-plugin httpclient
d483ad
d483ad
# Add proper Apache felix bundle plugin instructions
d483ad
# so that we get a reasonable OSGi manifest.
d483ad
for module in httpclient httpmime httpclient-cache fluent-hc; do
d483ad
    %pom_xpath_remove "pom:project/pom:packaging" $module
d483ad
    %pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" $module
d483ad
done
d483ad
d483ad
# Make fluent-hc into bundle
d483ad
%pom_xpath_inject pom:build "
d483ad
<plugins>
d483ad
    <plugin>
d483ad
      <groupId>org.apache.felix</groupId>
d483ad
      <artifactId>maven-bundle-plugin</artifactId>
d483ad
      <extensions>true</extensions>
d483ad
    </plugin>
d483ad
</plugins>" fluent-hc
d483ad
d483ad
# Make httpmime into bundle
d483ad
%pom_xpath_inject pom:build/pom:plugins "
d483ad
    <plugin>
d483ad
      <groupId>org.apache.felix</groupId>
d483ad
      <artifactId>maven-bundle-plugin</artifactId>
d483ad
      <extensions>true</extensions>
d483ad
    </plugin>" httpmime
d483ad
d483ad
# Make httpclient into bundle
d483ad
%pom_xpath_inject pom:reporting/pom:plugins "
d483ad
    <plugin>
d483ad
      <groupId>org.apache.felix</groupId>
d483ad
      <artifactId>maven-bundle-plugin</artifactId>
d483ad
      <configuration>
d483ad
        <instructions>
d483ad
          <Export-Package>*</Export-Package>
d483ad
          <Private-Package></Private-Package>
d483ad
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
d483ad
        </instructions>
d483ad
      </configuration>
d483ad
    </plugin>" httpclient
d483ad
%pom_xpath_inject pom:build/pom:plugins "
d483ad
    <plugin>
d483ad
      <groupId>org.apache.felix</groupId>
d483ad
      <artifactId>maven-bundle-plugin</artifactId>
d483ad
      <extensions>true</extensions>
d483ad
      <configuration>
d483ad
        <instructions>
d483ad
          <Export-Package>org.apache.http.*,!org.apache.http.param</Export-Package>
d483ad
          <Private-Package></Private-Package>
d483ad
          <_nouses>true</_nouses>
d483ad
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
d483ad
        </instructions>
d483ad
        <excludeDependencies>true</excludeDependencies>
d483ad
      </configuration>
d483ad
    </plugin>" httpclient
d483ad
d483ad
# Make httpclient-cache into bundle
d483ad
%pom_xpath_inject pom:build/pom:plugins "
d483ad
    <plugin>
d483ad
      <groupId>org.apache.felix</groupId>
d483ad
      <artifactId>maven-bundle-plugin</artifactId>
d483ad
      <extensions>true</extensions>
d483ad
      <configuration>
d483ad
        <instructions>
d483ad
          <Export-Package>*</Export-Package>
d483ad
          <Import-Package>net.sf.ehcache;resolution:=optional,net.spy.memcached;resolution:=optional,*</Import-Package>
d483ad
          <Private-Package></Private-Package>
d483ad
          <_nouses>true</_nouses>
d483ad
        </instructions>
d483ad
        <excludeDependencies>true</excludeDependencies>
d483ad
      </configuration>
d483ad
    </plugin>" httpclient-cache
d483ad
d483ad
# requires network
d483ad
rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
d483ad
d483ad
%if %{without memcached}
d483ad
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/memcached
d483ad
%pom_remove_dep :spymemcached httpclient-cache
d483ad
%endif
d483ad
%if %{without ehcache}
d483ad
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/ehcache
d483ad
%pom_remove_dep :ehcache-core httpclient-cache
d483ad
%endif
d483ad
d483ad
%build
d483ad
%mvn_file ":{*}" httpcomponents/@1
d483ad
d483ad
%mvn_build
d483ad
d483ad
%install
d483ad
%mvn_install
d483ad
d483ad
d483ad
%files -f .mfiles
d483ad
%doc LICENSE.txt NOTICE.txt README.txt RELEASE_NOTES.txt
d483ad
d483ad
%files cache -f .mfiles-cache
d483ad
d483ad
%files javadoc -f .mfiles-javadoc
d483ad
%doc LICENSE.txt NOTICE.txt
d483ad
d483ad
%changelog
d483ad
* Mon Mar 19 2018 Michael Simacek <msimacek@redhat.com> - 4.5.5-4
d483ad
- Fix FTBFS (weak crypto in test data)
d483ad
d483ad
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.5.5-3
d483ad
- Escape macros in %%changelog
d483ad
d483ad
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.5-2
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d483ad
d483ad
* Mon Jan 22 2018 Michael Simacek <msimacek@redhat.com> - 4.5.5-1
d483ad
- Update to upstream version 4.5.5
d483ad
d483ad
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.3-4
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d483ad
d483ad
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.3-3
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d483ad
d483ad
* Thu Feb 02 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-2
d483ad
- Add conditionals for memcached and ehcache
d483ad
d483ad
* Thu Jan 26 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-1
d483ad
- Update to upstream version 4.5.3
d483ad
d483ad
* Fri Jun 24 2016 Michael Simacek <msimacek@redhat.com> - 4.5.2-4
d483ad
- Fix build with httpcomponents-core-4.4.5
d483ad
d483ad
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.2-3
d483ad
- Add missing build-requires
d483ad
d483ad
* Wed Mar 16 2016 Sopot Cela <scela@redhat.com> - 4.5.2-2
d483ad
- Make the fluent API into a bundle
d483ad
d483ad
* Mon Feb 29 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.2-1
d483ad
- Update to upstream version 4.5.2
d483ad
d483ad
* Wed Feb 10 2016 Mat Booth <mat.booth@redhat.com> - 4.5.1-4
d483ad
- Enable the fluent API module
d483ad
d483ad
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.1-3
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d483ad
d483ad
* Mon Jan 25 2016 Mat Booth <mat.booth@redhat.com> - 4.5.1-2
d483ad
- Make client cache jar into a OSGi bundle
d483ad
d483ad
* Wed Sep 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.1-1
d483ad
- Update to upstream version 4.5.1
d483ad
d483ad
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5-2
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d483ad
d483ad
* Thu Jun 04 2015 Michael Simacek <msimacek@redhat.com> - 4.5-1
d483ad
- Update to upstream version 4.5
d483ad
d483ad
* Tue Mar 31 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4.1-1
d483ad
- Update to upstream version 4.4.1
d483ad
d483ad
* Wed Feb 18 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-1
d483ad
- Update to upstream version 4.4
d483ad
d483ad
* Thu Jan 22 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.3.beta1
d483ad
- Split httpclient-cache into subpackage
d483ad
d483ad
* Tue Jan 20 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.2.beta1
d483ad
- Unbundle publicsuffix-list
d483ad
- Resolves: rhbz#1183782
d483ad
d483ad
* Mon Jan 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.1.beta1
d483ad
- Update to upstream version 4.4 beta1
d483ad
- Remove tests subpackage
d483ad
d483ad
* Fri Jan  9 2015 Richard Fearn <richardfearn@gmail.com> - 4.3.5-3
d483ad
- Also build HttpClient Cache (bug #1180696)
d483ad
d483ad
* Tue Dec 02 2014 Michael Simacek <msimacek@redhat.com> - 4.3.5-2
d483ad
- Build and install tests artifact (needed by copr-java)
d483ad
d483ad
* Tue Aug  5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.5-1
d483ad
- Update to upstream version 4.3.5
d483ad
d483ad
* Mon Aug  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.4-2
d483ad
- Fix build-requires on httpcomponents-project
d483ad
d483ad
* Fri Jun  6 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.4-1
d483ad
- Update to upstream version 4.3.4
d483ad
d483ad
* Fri Feb 28 2014 Michael Simacek <msimacek@redhat.com> - 4.3.3-1
d483ad
- Update to upstream version 4.3.3
d483ad
d483ad
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.2-1
d483ad
- Update to upstream version 4.3.2
d483ad
d483ad
* Mon Jan 06 2014 Michael Simacek <msimacek@redhat.com> - 4.3.1-1
d483ad
- Update to upstream version 4.3.1
d483ad
- Temporarily disable tests due to bug in mockito
d483ad
d483ad
* Thu Oct  3 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3-2
d483ad
- Don't try to remove maven-notice-plugin from POM
d483ad
d483ad
* Fri Sep 13 2013 Michal Srb <msrb@redhat.com> - 4.3-1
d483ad
- Update to upstream version 4.3
d483ad
- Drop group tag
d483ad
d483ad
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.5-3
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d483ad
d483ad
* Mon Jun 10 2013 Michal Srb <msrb@redhat.com> - 4.2.5-2
d483ad
- Enable tests on Fedora
d483ad
d483ad
* Thu Apr 25 2013 Michal Srb <msrb@redhat.com> - 4.2.5-1
d483ad
- Update to upstream version 4.2.5
d483ad
d483ad
* Thu Apr 11 2013 Michal Srb <msrb@redhat.com> - 4.2.4-1
d483ad
- Update to upstream version 4.2.4
d483ad
d483ad
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 4.2.3-3
d483ad
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
d483ad
- Replace maven BuildRequires with maven-local
d483ad
d483ad
* Fri Jan 25 2013 Michal Srb <msrb@redhat.com> - 4.2.3-2
d483ad
- Build with xmvn
d483ad
- Disable fluent-hc module
d483ad
d483ad
* Thu Jan 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.3-1
d483ad
- Update to upstream version 4.2.3
d483ad
d483ad
* Thu Oct 25 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.2-1
d483ad
- Update to upstream version 4.2.2
d483ad
d483ad
* Wed Aug  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-3
d483ad
- Fix OSGi manifest in httpmime
d483ad
d483ad
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-2
d483ad
- Install NOTICE.txt file
d483ad
- Fix javadir directory ownership
d483ad
- Fix directory permissions
d483ad
- Preserve timestamps
d483ad
- Replace add_to_maven_depmap with add_maven_depmap
d483ad
d483ad
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-1
d483ad
- Update to upstream version 4.2.1
d483ad
- Convert patches to POM macros
d483ad
d483ad
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-4
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d483ad
d483ad
* Wed May 2 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-3
d483ad
- Do not export org.apache.http.param in osgi.
d483ad
d483ad
* Mon Mar 26 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-2
d483ad
- Do not export * but only org.apache.http.* .
d483ad
- Do not generate uses clauses in the manifest.
d483ad
d483ad
* Thu Mar  1 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> 4.1.3-1
d483ad
- Update to latest upstream bugfix
d483ad
d483ad
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-2
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d483ad
d483ad
* Tue Aug 16 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.2-1
d483ad
- Update to latest upstream (4.1.2)
d483ad
- Minor tweaks according to guidelines
d483ad
d483ad
* Fri Jul 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-3
d483ad
- Fix for RH Bz#718830. Add instructions so as to not
d483ad
  Import-Package optional dependencies.
d483ad
d483ad
* Thu Apr 7 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-2
d483ad
- Add BR/R apache-commons-codec, since httpcomponents-client's
d483ad
  MANIFEST.MF has an Import-Package: org.apache.commons.codec
d483ad
  header.
d483ad
d483ad
* Tue Mar 29 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.1-1
d483ad
- New upstream bugfix version (4.1.1)
d483ad
d483ad
* Tue Mar 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1-6
d483ad
- Explicitly set PrivatePackage to the empty set, so as to
d483ad
  export all packages.
d483ad
d483ad
* Thu Mar 10 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-5
d483ad
- OSGi export more packages.
d483ad
d483ad
* Fri Feb 25 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-4
d483ad
- Build httpmime module.
d483ad
d483ad
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-3
d483ad
- Don't use basename as an identifier.
d483ad
d483ad
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-2
d483ad
- OSGify properly.
d483ad
- Install into %%{_javadir}/%%{basename}.
d483ad
d483ad
* Thu Feb 17 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-1
d483ad
- Update to latest upstream version.
d483ad
d483ad
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.3-3
d483ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d483ad
d483ad
* Wed Dec 22 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-2
d483ad
- Added license to javadoc subpackage
d483ad
d483ad
* Mon Dec 20 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-1
d483ad
- Initial version