323bc54
# hadoop was retired
323bc54
%bcond_with hadoop
231e3fc
Name:          apache-commons-vfs
d550751
Version:       2.1
d7a8505
Release:       7%{?dist}
231e3fc
Summary:       Commons Virtual File System
231e3fc
License:       ASL 2.0
d550751
Url:           http://commons.apache.org/vfs/
d550751
Source0:       http://www.apache.org/dist/commons/vfs/source/commons-vfs-%{version}-src.tar.gz
4abefde
71751ae
BuildRequires: maven-local
71751ae
BuildRequires: mvn(com.jcraft:jsch)
71751ae
BuildRequires: mvn(commons-httpclient:commons-httpclient)
71751ae
BuildRequires: mvn(commons-io:commons-io)
71751ae
BuildRequires: mvn(commons-logging:commons-logging)
71751ae
BuildRequires: mvn(commons-net:commons-net)
71751ae
BuildRequires: mvn(javax.ws.rs:jsr311-api)
71751ae
BuildRequires: mvn(junit:junit)
71751ae
BuildRequires: mvn(org.apache.ant:ant)
d7a8505
%if %{without hadoop}
323bc54
BuildRequires: mvn(org.apache.hadoop:hadoop-common)
323bc54
BuildRequires: mvn(org.apache.hadoop:hadoop-hdfs)
323bc54
BuildRequires: mvn(org.apache.hadoop:hadoop-common::tests:)
323bc54
BuildRequires: mvn(org.apache.hadoop:hadoop-hdfs::tests:)
323bc54
%endif
71751ae
BuildRequires: mvn(org.apache.commons:commons-collections4)
71751ae
BuildRequires: mvn(org.apache.commons:commons-compress)
71751ae
BuildRequires: mvn(org.apache.commons:commons-lang3)
71751ae
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
71751ae
BuildRequires: mvn(org.apache.ftpserver:ftpserver-core)
71751ae
BuildRequires: mvn(org.apache.httpcomponents:httpcore-nio)
71751ae
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
71751ae
BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on)
71751ae
BuildRequires: mvn(org.slf4j:slf4j-api)
d80d2d7
231e3fc
BuildArch:     noarch
231e3fc
Provides:      %{name}2 = %{version}-%{release}
231e3fc
231e3fc
%description
231e3fc
Commons VFS provides a single API for accessing various
231e3fc
different file systems. It presents a uniform view of the
231e3fc
files from various different sources, such as the files on
231e3fc
local disk, on an HTTP server, or inside a Zip archive.
231e3fc
Some of the features of Commons VFS are:
231e3fc
* A single consistent API for accessing files of different
231e3fc
 types.
231e3fc
* Support for numerous file system types.
231e3fc
* Caching of file information. Caches information in-JVM,
231e3fc
 and optionally can cache remote file information on the
231e3fc
 local file system.
231e3fc
* Event delivery.
231e3fc
* Support for logical file systems made up of files from
231e3fc
 various different file systems.
231e3fc
* Utilities for integrating Commons VFS into applications,
231e3fc
 such as a VFS-aware ClassLoader and URLStreamHandlerFactory.
231e3fc
* A set of VFS-enabled Ant tasks.
231e3fc
231e3fc
%package ant
231e3fc
Summary:       Development files for Commons VFS
231e3fc
Requires:      %{name} = %{version}-%{release}
231e3fc
231e3fc
%description ant
231e3fc
This package enables support for the Commons VFS ant tasks.
231e3fc
231e3fc
%package examples
231e3fc
Summary:       Commons VFS Examples
231e3fc
231e3fc
%description examples
231e3fc
VFS is a Virtual File System library - Examples.
231e3fc
d550751
%package project
d550751
Summary:       Commons VFS Parent POM
d550751
d550751
%description project
d550751
Commons VFS Parent POM.
d550751
231e3fc
%package javadoc
231e3fc
Summary:       Javadoc for %{name}
231e3fc
231e3fc
%description javadoc
231e3fc
This package contains javadoc for %{name}.
231e3fc
231e3fc
%prep
d550751
%setup -q -n commons-vfs-%{version}
6afa195
6afa195
# Convert from dos to unix line ending
6afa195
for file in LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt; do
6afa195
 sed -i.orig 's|\r||g' $file
6afa195
 touch -r $file.orig $file
6afa195
 rm $file.orig
6afa195
done
231e3fc
4abefde
# Disable unwanted module
4abefde
%pom_disable_module dist
4abefde
d550751
# Fix ant gId
d550751
%pom_change_dep -r :ant org.apache.ant:
d550751
# Upadate bouncycastle aId
d550751
%pom_change_dep -r :bcprov-jdk16 :bcprov-jdk15on
d550751
d550751
# Remove unwanted dependency jackrabbit-{standalone,webdav}
d550751
%pom_remove_dep -r org.apache.jackrabbit:
4abefde
# Fix plugin configuration
4abefde
%pom_xpath_inject "pom:project/pom:reporting/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:configuration" "
4abefde
<excludePackageNames>*.webdav.*</excludePackageNames>"
4abefde
4abefde
# Disable jackrabbit-webdav support
4abefde
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin core "
4abefde
<executions>
4abefde
  <execution>
4abefde
    <id>default-compile</id>
4abefde
    <phase>compile</phase>
4abefde
    <configuration>
4abefde
      <excludes>
4abefde
       <exclude>**/webdav/*</exclude>
4abefde
      </excludes>
4abefde
    </configuration>
4abefde
    <goals>
4abefde
      <goal>compile</goal>
4abefde
    </goals>
4abefde
  </execution>
4abefde
  <execution>
4abefde
    <id>default-testCompile</id>
4abefde
    <phase>test-compile</phase>
4abefde
    <configuration>
4abefde
      <testExcludes>
4abefde
       <exclude>**/webdav/test/*</exclude>
4abefde
      </testExcludes>
4abefde
    </configuration>
4abefde
    <goals>
4abefde
      <goal>testCompile</goal>
4abefde
    </goals>
4abefde
  </execution>
4abefde
</executions>"
4abefde
231e3fc
rm -rf core/src/main/java/org/apache/commons/vfs2/provider/webdav
231e3fc
rm -rf core/src/test/java/org/apache/commons/vfs2/provider/webdav
231e3fc
sed -i 's|"webdav",||' core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java
231e3fc
d550751
rm core/src/test/java/org/apache/commons/vfs2/provider/ram/test/CustomRamProviderTest.java
d550751
d550751
# UnknownHostException: www.apache.org
d550751
rm core/src/test/java/org/apache/commons/vfs2/provider/http/test/GetContentInfoFunctionalTest.java \
d550751
 core/src/test/java/org/apache/commons/vfs2/provider/https/test/GetContentInfoFunctionalTest.java
d550751
# org.apache.commons.vfs2.FileSystemException: Could not connect to FTP server on "localhost".
d550751
rm core/src/test/java/org/apache/commons/vfs2/test/ProviderWriteAppendTests.java \
d550751
 core/src/test/java/org/apache/commons/vfs2/test/ProviderWriteTests.java
d550751
sed -i /ProviderWriteAppendTests/d core/src/test/java/org/apache/commons/vfs2/test/ProviderTestSuite.java
d550751
sed -i /ProviderWriteTests/d core/src/test/java/org/apache/commons/vfs2/test/ProviderTestSuite.java
d550751
# java.lang.IllegalStateException: The embedded HTTP server has not completed startup, increase wait time
d550751
rm core/src/test/java/org/apache/commons/vfs2/provider/http/test/HttpProviderTestCase.java \
d550751
 core/src/test/java/org/apache/commons/vfs2/provider/url/test/UrlProviderHttpTestCase.java
d550751
# Use old version of sshd-core
d550751
rm core/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderTestCase.java
d550751
%pom_remove_dep -r :sshd-core
d4f36a8
5f3c309
# hadoop has been retired
d7a8505
%if %{with hadoop}
5f3c309
%pom_remove_dep -r org.apache.hadoop
5f3c309
rm -r core/src/{main,test}/java/org/apache/commons/vfs2/provider/hdfs
323bc54
%endif
5f3c309
d80d2d7
# not really needed
d80d2d7
%pom_remove_plugin :maven-checkstyle-plugin
4abefde
%pom_remove_plugin :findbugs-maven-plugin
4abefde
4abefde
# Fix installation directory and symlink
d550751
%mvn_file :commons-vfs2 %{name}
d550751
%mvn_file :commons-vfs2 %{name}2
d550751
%mvn_file :commons-vfs2 commons-vfs
d550751
%mvn_file :commons-vfs2 commons-vfs2
d550751
%mvn_file :commons-vfs2-examples %{name}-examples
d550751
%mvn_file :commons-vfs2-examples %{name}2-examples
d550751
%mvn_file :commons-vfs2-examples commons-vfs-examples
d550751
%mvn_file :commons-vfs2-examples commons-vfs2-examples
d550751
d550751
%mvn_alias :commons-vfs2 "org.apache.commons:commons-vfs" "commons-vfs:commons-vfs"
d550751
%mvn_alias :commons-vfs2-examples "org.apache.commons:commons-vfs-examples" "commons-vfs:commons-vfs-examples"
231e3fc
d80d2d7
%build
71751ae
71751ae
# @ random tests fails
71751ae
# junit.framework.TestSuite@74e52303(org.apache.commons.vfs2.test.ProviderTestSuite)  Time elapsed: 4.092 sec  <<< ERROR!
71751ae
# java.lang.NullPointerException
71751ae
%mvn_build -s -- -Dmaven.test.failure.ignore=true
d80d2d7
d80d2d7
%install
d80d2d7
%mvn_install
231e3fc
231e3fc
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
d550751
echo "ant commons-logging commons-vfs" > commons-vfs
d550751
install -p -m 644 commons-vfs %{buildroot}%{_sysconfdir}/ant.d/commons-vfs
231e3fc
d80d2d7
%files -f .mfiles-commons-vfs2
ed1942a
%doc README.txt RELEASE-NOTES.txt
ed1942a
%license LICENSE.txt NOTICE.txt
231e3fc
d80d2d7
%files examples -f .mfiles-commons-vfs2-examples
d550751
%files project -f .mfiles-commons-vfs2-project
d550751
%license LICENSE.txt NOTICE.txt
231e3fc
d80d2d7
%files javadoc -f .mfiles-javadoc
ed1942a
%license LICENSE.txt NOTICE.txt
231e3fc
231e3fc
%files ant
d550751
%config %{_sysconfdir}/ant.d/commons-vfs
231e3fc
231e3fc
%changelog
d7a8505
* Fri Oct 28 2016 gil cattaneo <puntogil@libero.it> 2.1-7
d7a8505
- enable HDFS support (rhbz#1387108)
d7a8505
4a177e2
* Mon Oct  3 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1-6
4a177e2
- Remove build-requires on perl
4a177e2
1c4bb4d
* Thu Jul 21 2016 gil cattaneo <puntogil@libero.it> 2.1-5
1c4bb4d
- add missing BR
1c4bb4d
71751ae
* Sat Jun 25 2016 gil cattaneo <puntogil@libero.it> 2.1-4
71751ae
- disable tests failure
71751ae
323bc54
* Thu Jun 02 2016 gil cattaneo <puntogil@libero.it> 2.1-3
323bc54
- disable hadoop stuff with bcond
323bc54
5f3c309
* Thu Jun 02 2016 Michael Simacek <msimacek@redhat.com> - 2.1-2
5f3c309
- Remove support for retired hadoop
5f3c309
d550751
* Sun May 22 2016 gil cattaneo <puntogil@libero.it> 2.1-1
d550751
- update to 2.1
d550751
7915d28
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-17
7915d28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7915d28
a9e6b64
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-16
a9e6b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a9e6b64
ed1942a
* Thu Jan 29 2015 gil cattaneo <puntogil@libero.it> 2.0-15
ed1942a
- introduce license macro
ed1942a
327ddd0
* Wed Jul 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0-14
327ddd0
- Fix build-requires on apache-commons-parent
327ddd0
699d9a6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-13
699d9a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
699d9a6
Stanislav Ochotnicky cdcbc2e
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-12
Stanislav Ochotnicky cdcbc2e
- Use Requires: java-headless rebuild (#1067528)
Stanislav Ochotnicky cdcbc2e
cba5ef6
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-11
cba5ef6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
cba5ef6
375d95b
* Fri Jun 28 2013 gil cattaneo <puntogil@libero.it> 2.0-10
375d95b
- used pom_xpath_set macro
375d95b
4abefde
* Fri Jun 28 2013 gil cattaneo <puntogil@libero.it> 2.0-9
4abefde
- swith to pom macros
4abefde
- packaged in /usr/share/java instead of /usr/share/java/apache-commons-vfs
4abefde
0f82e9b
* Fri Jun 28 2013 Michal Srb <msrb@redhat.com> - 2.0-8
0f82e9b
- Fix directory ownership
0f82e9b
d80d2d7
* Thu Jun 27 2013 Michal Srb <msrb@redhat.com> - 2.0-7
d80d2d7
- Build with XMvn
d80d2d7
- Do not ignore test failures
d80d2d7
- Fix BR
d80d2d7
752350a
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-6
752350a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
752350a
Stanislav Ochotnicky 33a97c7
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 2.0-5
Stanislav Ochotnicky 33a97c7
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
Stanislav Ochotnicky 33a97c7
- Replace maven BuildRequires with maven-local
Stanislav Ochotnicky 33a97c7
7c1ff79
* Wed Aug  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0-4
7c1ff79
- Rebuild against javamail
7c1ff79
d4ac613
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-3
d4ac613
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d4ac613
231e3fc
* Mon Jun 18 2012 gil cattaneo <puntogil@libero.it> 2.0-2
231e3fc
- add subpackage ant
231e3fc
- install NOTICE.txt in javadocs subpackage
231e3fc
231e3fc
* Mon May 14 2012 gil cattaneo <puntogil@libero.it> 2.0-1
7c1ff79
- initial rpm