From 843773c6516c1c87ea1cdb0745ec571dae935f8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 8 Sep 2016 18:50:18 +0200 Subject: [PATCH] More clean and lightweight downloading of dependencies for testing. --- jOCCI-api/jOCCI-api.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/jOCCI-api/jOCCI-api.spec b/jOCCI-api/jOCCI-api.spec index 40391f1..a16b141 100644 --- a/jOCCI-api/jOCCI-api.spec +++ b/jOCCI-api/jOCCI-api.spec @@ -2,6 +2,7 @@ %global gittag0 jocci-api-0.2.6 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +# requires network access %global use_tests 1 Name: jOCCI-api @@ -18,14 +19,14 @@ BuildRequires: maven-local BuildRequires: mvn(cz.cesnet.cloud:jocci-core) BuildRequires: mvn(com.google.code.gson:gson) %if 0%{?use_tests} -# for downloading dependencies -BuildRequires: maven +# to download dependencies +BuildRequires: maven maven-clean-plugin maven-dependency-plugin maven-deploy-plugin maven-install-plugin BuildRequires: mvn(junit:junit) -# not available +# not available (downloaded) #BuildRequires: mvn(com.github.tomakehurst:wiremock) %endif BuildRequires: mvn(org.apache.httpcomponents:httpclient:4.3) -BuildRequires: mvn(org.bouncycastle:bcprov-jdk16) = 1.46 +BuildRequires: mvn(org.bouncycastle:bcprov-jdk16:1.46) BuildRequires: mvn(org.slf4j:slf4j-log4j12) %description @@ -46,6 +47,7 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{commit0} +%pom_remove_plugin com.github.github:site-maven-plugin %pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin @@ -54,12 +56,7 @@ This package contains the API documentation for %{name}. %pom_add_dep org.apache.httpcomponents:httpclient:4.3 %if 0%{?use_tests} -mvn dependency:copy-dependencies -find ~/.m2 -type d -name bcprov\* -exec rm -rvf {} \; || : -find ~/.m2 -type d -name httpcore -exec rm -rvf {} \; || : -find ~/.m2 -type d -name httpclient -exec rm -rvf {} \; || : -find ~/.m2 -type d -name jocci\* -exec rm -rvf {} \; || : -find ~/.m2 -type d -name junit\* -exec rm -rvf {} \; || : +mvn_bootstrap=1 xmvn -DincludeArtifactIds=com.github.tomakehurst:wiremock dependency:copy-dependencies %mvn_build %else %mvn_build -f -- 1.8.2.3