diff --git a/maven-wagon.spec b/maven-wagon.spec index 14f1756..6f8f113 100644 --- a/maven-wagon.spec +++ b/maven-wagon.spec @@ -1,9 +1,11 @@ +%bcond_without scm +%bcond_without ssh %global bname wagon %global split_verrel 2.6-4 Name: maven-%{bname} Version: 2.10 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 0 Summary: Tools to manage artifacts and deployment License: ASL 2.0 @@ -15,9 +17,11 @@ Patch0: 0001-Port-to-jetty-9.patch BuildArch: noarch BuildRequires: maven-local +%if %{with ssh} BuildRequires: mvn(com.jcraft:jsch) BuildRequires: mvn(com.jcraft:jsch.agentproxy.connector-factory) BuildRequires: mvn(com.jcraft:jsch.agentproxy.jsch) +%endif BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(commons-lang:commons-lang) BuildRequires: mvn(commons-logging:commons-logging) @@ -25,9 +29,10 @@ BuildRequires: mvn(commons-net:commons-net) BuildRequires: mvn(org.apache.httpcomponents:httpclient) BuildRequires: mvn(org.apache.httpcomponents:httpcore) BuildRequires: mvn(org.apache.maven:maven-parent:pom:) -BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) +%if %{with scm} BuildRequires: mvn(org.apache.maven.scm:maven-scm-api) +%endif BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) BuildRequires: mvn(org.codehaus.plexus:plexus-interactivity-api) BuildRequires: mvn(org.codehaus.plexus:plexus-utils) @@ -37,20 +42,6 @@ BuildRequires: mvn(org.slf4j:slf4j-api) Obsoletes: %{name}-manual < %{epoch}:%{version}-%{release} Obsoletes: %{name}-provider-test < %{epoch}:%{version}-%{release} -# Require all submodules for now until all packages migrate to wagon -# subpackages. -Requires: %{name}-provider-api = %{version}-%{release} -Requires: %{name}-providers = %{version}-%{release} -Requires: %{name}-file = %{version}-%{release} -Requires: %{name}-ftp = %{version}-%{release} -Requires: %{name}-http = %{version}-%{release} -Requires: %{name}-http-shared = %{version}-%{release} -Requires: %{name}-http-lightweight = %{version}-%{release} -Requires: %{name}-scm = %{version}-%{release} -Requires: %{name}-ssh-external = %{version}-%{release} -Requires: %{name}-ssh-common = %{version}-%{release} -Requires: %{name}-ssh = %{version}-%{release} - %description Maven Wagon is a transport abstraction that is used in Maven's artifact and repository handling code. Currently wagon has the @@ -106,12 +97,15 @@ Summary: http-lightweight module for %{name} %description http-lightweight http-lightweight module for %{name}. +%if %{with scm} %package scm Summary: scm module for %{name} %description scm scm module for %{name}. +%endif +%if %{with ssh} %package ssh-external Summary: ssh-external module for %{name} @@ -129,6 +123,7 @@ Summary: ssh module for %{name} %description ssh ssh module for %{name}. +%endif %package javadoc Summary: Javadoc for %{name} @@ -142,6 +137,7 @@ Javadoc for %{name}. %patch0 -p1 %pom_remove_plugin :animal-sniffer-maven-plugin +%pom_remove_plugin :maven-enforcer-plugin %pom_remove_dep :wagon-tck-http wagon-providers/wagon-http # correct groupId for jetty @@ -157,6 +153,15 @@ Javadoc for %{name}. # missing dependencies %pom_disable_module wagon-webdav-jackrabbit wagon-providers +%if %{without scm} +%pom_disable_module wagon-scm wagon-providers +%endif +%if %{without ssh} +%pom_disable_module wagon-ssh wagon-providers +%pom_disable_module wagon-ssh-common wagon-providers +%pom_disable_module wagon-ssh-external wagon-providers +%endif + %build %mvn_file ":wagon-{*}" %{name}/@1 @@ -182,15 +187,23 @@ Javadoc for %{name}. %files http -f .mfiles-wagon-http %files http-shared -f .mfiles-wagon-http-shared %files http-lightweight -f .mfiles-wagon-http-lightweight +%if %{with scm} %files scm -f .mfiles-wagon-scm +%endif +%if %{with ssh} %files ssh-external -f .mfiles-wagon-ssh-external %files ssh-common -f .mfiles-wagon-ssh-common %files ssh -f .mfiles-wagon-ssh +%endif %files javadoc -f .mfiles-javadoc %doc LICENSE NOTICE DEPENDENCIES %changelog +* Mon Feb 06 2017 Michael Simacek - 0:2.10-3 +- Add conditionals for ssh and scm +- Remove old requires from main package + * Thu Feb 04 2016 Fedora Release Engineering - 0:2.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild