%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
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
%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
%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