Apache Commons logo Commons VFS

Download

The latest release (binaries and source) of Commons VFS can be found here.

You will also need to download the dependencies (jars) used by Apache Commons VFS. You can download the jars from the list below; with Apache Maven dependency resolution is automatic.

Dependency Required For
Commons Logging Version 1.2. All
Commons Collections Version 4.0. LRU Cache (optional)
Commons Compress Version 1.9. TAR, Bzip2
Commons Net Version 3.3. FTP
Commons Httpclient Version 3.1.
Requires Commons Codec Version 1.2.
WebDAV, HTTP, URI Utils
Apache Jackrabbit WebDAV Library Version 1.6.5.
Requires Jackrabbit JCR Commons Version 1.6.5 and SLF4J Version 1.5.3 (Api and Impl).
WebDAV
JSch Version 0.1.51. SFTP
Apache Hadoop Common Version 2.6.0.
Apache Hadoop HDFS Common Version 2.6.0
This requires a number of dependencies, use $HADOOP_HOME/bin/hadoop classpath command.
hdfs
jCIFS Version 0.8.3. CIFS (VFS sandbox)
javamail Version 1.4.7. mime (VFS sandbox)

Obtaining Commons VFS source

To obtain the Commons VFS source, you can either:

  • The primary source repository for the Apache Commons VFS project is the Subversion repository. You can use the following command to check out the latest source version:
    svn co http://svn.apache.org/repos/asf/commons/proper/vfs/trunk commons-vfs

    For a certain version please look at http://svn.apache.org/repos/asf/commons/proper/vfs/tags
  • If you prefer Git, you can get the sources from the Apache Git mirror:

    git clone git://git.apache.org/commons-vfs.git commons-vfs

    There is also a guideline for contributing via GitHub.
  • Obtain the source from the latest release distribution. See the downloads page.

Building Commons VFS

To build Commons VFS, you can use Maven 3.0.5 or later. You need to use Java 6 or later (tested with Java 6 - 8). Production builds are done with the -Pjava-1.6 profile from Commons Parent (which will compile and test with a JDK from the JAVA_1_6_HOME environment variable).

Use mvn clean verify to locally build and test the core and examples modules. This will build the core JAR files in commons-vfs/core/target/commons-vfs2-<version>.jar.

If you want to build the additional sandbox file systems as well, use mvn -Pinclude-sandbox clean verify. This will also create the sandbox components in commons-vfs/sandbox/target/commons-vfs2-sandbox-<version>.jar.

See the commons-vfs2-example Module on how to use VFS Example Shell to verify the result.