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