<?xml version="1.0"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--> | |
<document> | |
<properties> | |
<title>Apache Commons VFS Examples</title> | |
<author email="dev@commons.apache.org">Apache Commons Developers</author> | |
</properties> | |
<body> | |
<section name="About Apache Commons VFS Examples"> | |
<p> | |
This example module contains sample | |
<a href="xref/index.html">source code</a> for learning how to use Apache | |
Commons VFS in the <code>org.apache.commons.vfs2.example</code> package. | |
</p> | |
<p> | |
The <code>org.apache.commons.vfs2.libcheck</code> package contains some Java | |
classes to exercise some of the functionality of the libraries (dependencies) | |
used by Apache Commons VFS. This is mainly for the maintainers of VFS providers. | |
</p> | |
</section> | |
<section name="Commons VFS Shell Example"> | |
<p> | |
The Commons VFS Shell is an example for a command line shell. | |
It can be used to play with different providers and to verify | |
an installation. | |
</p> | |
<p> | |
Check out the page <a href="https://wiki.apache.org/commons/VfsExampleShell">VfsExampleShell</a> | |
on the Apache Commons Wiki for a number of examples. In particular you can use the <code>info</code> | |
command to list the schemes which are auto discovered by the <code>StandardFileSystemManager</code>. | |
</p> | |
<p> | |
The following examples assume an environment variable REP which points to a populated local Maven | |
repository. As an alternative you can <a href="../download.html">download</a> the required | |
<a href="../commons-vfs2/dependencies.html">dependencies</a> manually. (The commons-collection4 | |
dependency is not needed for the VFS Shell as it does not use <code>LRUFilesCache</code>.) Because | |
of licensing restrictions the sandbox component must be | |
<a href="../commons-vfs2-sandbox/index.html">built locally</a> and then installed into the repository. | |
</p> | |
<subsection name="Starting VFS Shell on Linux/Unix"> | |
<source><![CDATA[ | |
REP=~/.m2/repository | |
LIB=$REP/commons-logging/commons-logging/1.2/commons-logging-1.2.jar | |
LIB=$LIB:$REP/commons-net/commons-net/3.6/commons-net-3.6.jar | |
# LIB=$LIB:$REP/org/apache/commons/commons-collections4/4.1/commons-collection-4.1.jar | |
LIB=$LIB:$REP/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:$REP/commons-codec/commons-codec/1.2/commons-codec-1.2.jar | |
LIB=$LIB:$REP/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar | |
# next 3 lines are for webdav | |
LIB=$LIB:$REP/org/apache/jackrabbit/jackrabbit-webdav/1.6.5/jackrabbit-webdav-1.6.5.jar | |
LIB=$LIB:$REP/org/slf4j/slf4j-api/1.5.11/slf4j-api-1.5.11.jar:$REP/org/slf4j/slf4j-simple/1.5.3/slf4j-simple-1.5.3.jar | |
LIB=$LIB:$REP/org/apache/jackrabbit/jackrabbit-jcr-commons/1.6.5/jackrabbit-jcr-commons-1.6.5.jar | |
# LIB=$LIB:$REP/org/apache/commons/commons-vfs2-sandbox/2.3/commons-vfs2-sandbox-2.3.jar:$REP/jcifs/jcifs/0.8.3/jcifs-0.8.3.jar | |
LIB=$LIB:$REP/org/apache/commons/commons-vfs2-examples/2.3/commons-vfs2-examples-2.3.jar | |
LIB=$LIB:$REP/org/apache/commons/commons-vfs2/2.3/commons-vfs2-2.3.jar | |
java -cp $LIB org.apache.commons.vfs2.example.Shell | |
]]></source> | |
</subsection> | |
<subsection name="Starting VFS Shell on Windows"> | |
<source><![CDATA[ | |
set REP=%USERPROFILE%\.m2\repository | |
set LIB=%REP%\commons-logging\commons-logging\1.2\commons-logging-1.2.jar | |
set LIB=%LIB%;%REP%\commons-net\commons-net\2.2\commons-net-2.2.jar | |
REM # set LIB=%LIB%;%REP%\org\apache\commons\commons-collections4\4.1\commons-collection-4.1.jar | |
set LIB=%LIB%;%REP%\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;%REP%\commons-codec\commons-codec\1.2\commons-codec-1.2.jar | |
set LIB=%LIB%;%REP%\com\jcraft\jsch\0.1.54\jsch-0.1.54.jar | |
REM # next 3 lines are for webdav | |
set LIB=%LIB%;%REP%\org\apache\jackrabbit\jackrabbit-webdav\1.6.5\jackrabbit-webdav-1.6.5.jar | |
set LIB=%LIB%;%REP%\org\slf4j\slf4j-api\1.5.11\slf4j-api-1.5.11.jar;%REP%\org\slf4j\slf4j-simple\1.5.3\slf4j-simple-1.5.3.jar | |
set LIB=%LIB%;%REP%\org\apache\jackrabbit\jackrabbit-jcr-commons\1.6.5\jackrabbit-jcr-commons-1.6.5.jar | |
REM # set LIB=%LIB%;%REP%\org\apache\commons\commons-vfs2-sandbox\2.3\commons-vfs2-sandbox-2.3.jar;%REP%\jcifs\jcifs\0.8.3\jcifs-0.8.3.jar | |
set LIB=%LIB%;%REP%\org\apache\commons\commons-vfs2-examples\2.3\commons-vfs2-examples-2.3.jar | |
set LIB=%LIB%;%REP%\org\apache\commons\commons-vfs2\2.3\commons-vfs2-2.3.jar | |
java -cp %LIB% org.apache.commons.vfs2.example.Shell | |
]]></source> | |
</subsection> | |
</section> | |
</body> | |
</document> | |