SHA256
1
0
forked from pool/apache-ivy

Accepting request 713014 from Java:packages

add ssh and vfs integration

OBS-URL: https://build.opensuse.org/request/show/713014
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-ivy?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2019-07-08 12:59:14 +00:00 committed by Git OBS Bridge
commit 9cae7b473b
2 changed files with 37 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 2 09:22:21 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Add possibility to build with ssh and vfs integration, since
we have all the dependencies in openSUSE.
-------------------------------------------------------------------
Mon Apr 8 18:12:07 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -16,6 +16,8 @@
#
%bcond_without ssh
%bcond_without vfs
Name: apache-ivy
Version: 2.4.0
Release: 0
@ -39,6 +41,14 @@ BuildRequires: oro
Provides: ivy = %{version}-%{release}
Obsoletes: ivy < %{version}-%{release}
BuildArch: noarch
%if %{with vfs}
BuildRequires: apache-commons-vfs2
%endif
%if %{with ssh}
BuildRequires: jsch-agent-proxy-connector-factory
BuildRequires: jsch-agent-proxy-core
BuildRequires: jsch-agent-proxy-jsch
%endif
%description
Apache Ivy is a tool for managing (recording, tracking, resolving and
@ -70,23 +80,39 @@ rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle
# Remove prebuilt documentation
rm -rf doc build/doc
# How to properly disable a plugin?
# we disable vfs plugin since commons-vfs is not available
rm -rf src/java/org/apache/ivy/plugins/repository/vfs \
src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
# Port from commons-vfs 1.x to 2.x
%if %{with vfs}
sed -i "s/commons.vfs/&2/" {src,test}/java/org/apache/ivy/plugins/repository/vfs/*
%else
sed -i /commons-vfs/d ivy.xml
sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \
src/java/org/apache/ivy/core/settings/typedef.properties
rm -rf src/java/org/apache/ivy/plugins/repository/vfs
rm -rf src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
%endif
%if %{without ssh}
rm -r src/java/org/apache/ivy/plugins/repository/{ssh,sftp}
rm src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java
%endif
%build
# Craft class path
mkdir -p lib
build-jar-repository lib ant ant/ant-nodeps oro jsch commons-httpclient
export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient)
%if %{with vfs}
build-jar-repository lib commons-vfs2
export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2)
%endif
%if %{with ssh}
build-jar-repository lib jsch.agentproxy.core \
jsch.agentproxy.connector-factory \
jsch.agentproxy.jsch
export CLASSPATH=${CLASSPATH}:$(build-classpath jsch.agentproxy.core jsch.agentproxy.connector-factory jsch.agentproxy.jsch)
%endif
# Build
export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient)
ant -Dtarget.ivy.version=%{version} /localivy /offline jar javadoc
%install