From e0f09d8ba954569d684ce87a758842f5c4b5d8b4 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Mon, 10 Jun 2013 13:58:33 +0200 Subject: [PATCH] Enable tests on Fedora --- httpcomponents-client.spec | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/httpcomponents-client.spec b/httpcomponents-client.spec index 6143566..fbe7fef 100644 --- a/httpcomponents-client.spec +++ b/httpcomponents-client.spec @@ -3,7 +3,7 @@ Name: httpcomponents-client Summary: HTTP agent implementation based on httpcomponents HttpCore Version: 4.2.5 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries License: ASL 2.0 URL: http://hc.apache.org/ @@ -12,10 +12,15 @@ Source0: http://archive.apache.org/dist/httpcomponents/httpclient/sour BuildArch: noarch BuildRequires: maven-local -BuildRequires: httpcomponents-project -BuildRequires: httpcomponents-core -BuildRequires: apache-mime4j -BuildRequires: apache-commons-codec +BuildRequires: mvn(commons-codec:commons-codec) +BuildRequires: mvn(commons-logging:commons-logging) +BuildRequires: mvn(org.apache.httpcomponents:httpcore) +BuildRequires: mvn(org.apache.httpcomponents:project) +%if 0%{?fedora} +# Test dependencies +BuildRequires: mvn(org.mockito:mockito-core) +BuildRequires: mvn(junit:junit) +%endif %description HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on @@ -40,11 +45,13 @@ Group: Documentation %pom_disable_module httpclient-cache %pom_disable_module httpclient-osgi %pom_disable_module fluent-hc -%pom_remove_dep :mockito-core httpclient %pom_remove_plugin :maven-notice-plugin %pom_remove_plugin :docbkx-maven-plugin %pom_remove_plugin :clirr-maven-plugin %pom_remove_plugin :maven-clover2-plugin httpclient +%if !0%{?fedora} +%pom_remove_dep :mockito-core httpclient +%endif # Add proper Apache felix bundle plugin instructions # so that we get a reasonable OSGi manifest. @@ -94,7 +101,14 @@ done %build %mvn_file ":{*}" httpcomponents/@1 + +# Build with tests enabled on Fedora +%if 0%{?fedora} +%mvn_build +%else %mvn_build -f +%endif + %install %mvn_install @@ -108,6 +122,9 @@ done %doc LICENSE.txt NOTICE.txt %changelog +* Mon Jun 10 2013 Michal Srb - 4.2.5-2 +- Enable tests on Fedora + * Thu Apr 25 2013 Michal Srb - 4.2.5-1 - Update to upstream version 4.2.5