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