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
Apache Commons Logging All
Apache Commons Lang All
Apache Commons Collections LRU Cache (optional)
Apache Commons Compress TAR, Bzip2
Apache Commons Net FTP
Apache 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)

Building Commons VFS

To build Commons VFS, get the sources and use Apache Maven 3.2.5 or later. You need to use Java 8 or later. Production builds can be 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.