Apache Commons logo Commons VFS


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 All
Commons Collections LRU Cache (optional)
Commons Compress TAR, Bzip2
Commons Net FTP
Commons Httpclient
Requires Commons Codec
Apache Jackrabbit WebDAV Library
Requires Jackrabbit JCR Commons and SLF4J (Api and Impl).
Apache Hadoop Common
Apache Hadoop HDFS Common
This requires a number of dependencies, use $HADOOP_HOME/bin/hadoop classpath command.
jCIFS CIFS (VFS sandbox)
javamail 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 8 or later. Production builds are done with the -Pjava-1.8 profile from Commons Parent (which will compile and test with a JDK from the JAVA_1_8_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.