Added: synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/mail-lists.xml URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/mail-lists.xml?rev=1000332&view=auto ============================================================================== --- synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/mail-lists.xml (added) +++ synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/mail-lists.xml Thu Sep 23 06:04:21 2010 @@ -0,0 +1,202 @@ +<?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. +--> +<!-- + +======================================================================+ + |**** ****| + |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****| + |**** DO NOT EDIT DIRECTLY ****| + |**** ****| + +======================================================================+ + | TEMPLATE FILE: mail-lists-template.xml | + | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates | + +======================================================================+ + | | + | 1) Re-generate using: mvn commons:mail-page | + | | + | 2) Set the following properties in the component's pom: | + | - commons.componentid (required, alphabetic, lower case) | + | | + | 3) Example Properties | + | | + | <properties> | + | <commons.componentid>math</commons.componentid> | + | </properties> | + | | + +======================================================================+ +--> +<document> + <properties> + <title>Commons VFS Mailing Lists</title> + <author email="[email protected]">Commons Documentation Team</author> + </properties> + <body> + + <section name="Overview"> + <p> + <a href="index.html">Commons VFS</a> shares mailing lists with all the other + <a href="http://commons.apache.org/components.html">Commons Components</a>. + To make it easier for people to only read messages related to components they are interested in, + the convention in Commons is to prefix the subject line of messages with the component's name, + for example: + <ul> + <li>[vfs] Problem with the ...</li> + </ul> + </p> + <p> + Questions related to the usage of Commons VFS should be posted to the + <a href="http://mail-archives.apache.org/mod_mbox/commons-user/">User List</a>. + <br /> + The <a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">Developer List</a> + is for questions and discussion related to the development of Commons VFS. + <br /> + Please do not cross-post; developers are also subscribed to the user list. + </p> + <p> + <strong>Note:</strong> please don't send patches or attachments to any of the mailing lists. + Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system. + Otherwise, please upload the file to a public server and include the URL in the mail. + </p> + </section> + + <section name="Commons VFS Mailing Lists"> + <p> + <strong>Please prefix the subject line of any messages for <a href="index.html">Commons VFS</a> + with <i>[vfs]</i></strong> - <i>thanks!</i> + <br /> + <br /> + </p> + + <table> + <tr> + <th>Name</th> + <th>Subscribe</th> + <th>Unsubscribe</th> + <th>Post</th> + <th>Archive</th> + <th>Other Archives</th> + </tr> + + + <tr> + <td> + <strong>Commons User List</strong> + <br /><br /> + Questions on using Commons VFS. + <br /><br /> + </td> + <td><a href="mailto:[email protected]">Subscribe</a></td> + <td><a href="mailto:[email protected]">Unsubscribe</a></td> + <td><a href="mailto:[email protected]?subject=[vfs]">Post</a></td> + <td><a href="http://mail-archives.apache.org/mod_mbox/commons-user/">mail-archives.apache.org</a></td> + <td><a href="http://markmail.org/list/org.apache.commons.users/">markmail.org</a><br /> + <a href="http://www.mail-archive.com/[email protected]/">www.mail-archive.com</a><br /> + <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a> + </td> + </tr> + + + <tr> + <td> + <strong>Commons Developer List</strong> + <br /><br /> + Discussion of development of Commons VFS. + <br /><br /> + </td> + <td><a href="mailto:[email protected]">Subscribe</a></td> + <td><a href="mailto:[email protected]">Unsubscribe</a></td> + <td><a href="mailto:[email protected]?subject=[vfs]">Post</a></td> + <td><a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">mail-archives.apache.org</a></td> + <td><a href="http://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br /> + <a href="http://www.mail-archive.com/[email protected]/">www.mail-archive.com</a><br /> + <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a> + </td> + </tr> + + + <tr> + <td> + <strong>Commons Issues List</strong> + <br /><br /> + Only for e-mails automatically generated by the <a href="issue-tracking.html">issue tracking</a> system. + <br /><br /> + </td> + <td><a href="mailto:[email protected]">Subscribe</a></td> + <td><a href="mailto:[email protected]">Unsubscribe</a></td> + <td><i>read only</i></td> + <td><a href="http://mail-archives.apache.org/mod_mbox/commons-issues/">mail-archives.apache.org</a></td> + <td><a href="http://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br /> + <a href="http://www.mail-archive.com/[email protected]/">www.mail-archive.com</a> + </td> + </tr> + + + <tr> + <td> + <strong>Commons Commits List</strong> + <br /><br /> + Only for e-mails automatically generated by the <a href="source-repository.html">source control</a> sytem. + <br /><br /> + </td> + <td><a href="mailto:[email protected]">Subscribe</a></td> + <td><a href="mailto:[email protected]">Unsubscribe</a></td> + <td><i>read only</i></td> + <td><a href="http://mail-archives.apache.org/mod_mbox/commons-commits/">mail-archives.apache.org</a></td> + <td><a href="http://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br /> + <a href="http://www.mail-archive.com/[email protected]/">www.mail-archive.com</a> + </td> + </tr> + + </table> + + </section> + <section name="Apache Mailing Lists"> + <p> + Other mailing lists which you may find useful include: + </p> + + <table> + <tr> + <th>Name</th> + <th>Subscribe</th> + <th>Unsubscribe</th> + <th>Post</th> + <th>Archive</th> + <th>Other Archives</th> + </tr> + <tr> + <td> + <strong>Apache Announce List</strong> + <br /><br /> + General announcements of Apache project releases. + <br /><br /> + </td> + <td><a class="externalLink" href="mailto:[email protected]">Subscribe</a></td> + <td><a class="externalLink" href="mailto:[email protected]">Unsubscribe</a></td> + <td><i>read only</i></td> + <td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/announce/">mail-archives.apache.org</a></td> + <td><a class="externalLink" href="http://markmail.org/list/org.apache.announce/">markmail.org</a><br /> + <a class="externalLink" href="http://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br /> + <a class="externalLink" href="http://www.mail-archive.com/[email protected]/">www.mail-archive.com</a><br /> + <a class="externalLink" href="http://news.gmane.org/gmane.comp.apache.announce">news.gmane.org</a> + </td> + </tr> + </table> + + </section> + </body> +</document>
Added: synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testing.xml URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testing.xml?rev=1000332&view=auto ============================================================================== --- synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testing.xml (added) +++ synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testing.xml Thu Sep 23 06:04:21 2010 @@ -0,0 +1,289 @@ +<!-- + 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>Running the Tests</title> + <author email="[email protected]">Ralph Goers</author> + </properties> + + <body> + <section name="Running the tests"> + <p> + This page details how to setup the tests for the various providers and then + run them with Maven 2. + </p> + <p> + The tests were run on Mac OS/X 10.5. The tests requiring a remote repository + were pointed to a second machine running Kubuntu 7.10 and the various servers + that can be installed from the system administration tool. The only exception + to this is that the WebDAV and Http support was testing using Day CRX 1.4 as + the server. + </p> + + <subsection name="Getting Started"> + <p> + First, from the root directory of the project, run <code>mvn install</code>. + This will compile all the source and test source and then run all the tests + for providers that use the local file system. + </p> + </subsection> + + <subsection name="Setting up the remote server"> + <p> + Each remote service needs to have the test data placed within it's "repository". + After running the maven build, the test data can be found in + core/target/test-data. Each service may require a userid and password to be + created. For example, to run the ftp test on a Linux system a user should be + created and the test data placed within that user's home directory. See the + following sections for details on each service. + </p> + <p> + Each repository should contain the following list of files for the tests to + complete successfully. + </p> + <source><![CDATA[ +write-tests +read-tests +read-tests/file1.txt +read-tests/dir1 +read-tests/dir1/file1.txt +read-tests/dir1/file2.txt +read-tests/dir1/file3.txt +read-tests/dir1/subdir1 +read-tests/dir1/subdir1/file1.txt +read-tests/dir1/subdir1/file2.txt +read-tests/dir1/subdir1/file3.txt +read-tests/dir1/subdir2 +read-tests/dir1/subdir2/file1.txt +read-tests/dir1/subdir2/file2.txt +read-tests/dir1/subdir2/file3.txt +read-tests/dir1/subdir3 +read-tests/dir1/subdir3/file1.txt +read-tests/dir1/subdir3/file2.txt +read-tests/dir1/subdir3/file3.txt +read-tests/empty.txt +read-tests/file%.txt +code +code/sealed +code/sealed/AnotherClass.class +code/ClassToLoad.class]]></source> + </subsection> + + <subsection name="Apache 2 Webserver"> + <p> + Create a user on the system + </p> + <ol> + <li>Create a user 'vfsusr' with password 'vfs/%\te:st' and home directory '/home/vfsusr' + <br/> + <source><![CDATA[ +useradd -p vfsusr -m vfsusr]]></source> + </li> + <li>In vfsuser's home directory create the directories + <ol> + <li>vfstest</li> + <li>vfstest/write-tests</li> + </ol> + </li> + <li>Copy the test data into the vfstest directory</li> + <li>Create a symbolic link at '/vfstest' to /home/vfsuser/vfstest<br /> + <source><![CDATA[ +ln -s /vfstest /home/vfsusr/vfstest]]></source> + </li> + <li>Create a file named '/etc/apache2/conf.d/vfstest.conf' with this content<br /> + <source><![CDATA[ +# +# VFSTEST +# +Alias /vfstest /vfstest/ + +DAVLockDB /var/lib/apache2/dav.lockDB +DAVMinTimeout 600 + +<Directory /vfstest> + Options None + AllowOverride None + Order allow,deny + Allow from all +</Directory> + +<Location /> + DAV On + Options Indexes MultiViews + AllowOverride None + + AuthType Basic + AuthName vfstest_zone + AuthUserFile /etc/apache2/passwd + <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> + Require user vfsusr + </Limit> +</Location>]]></source> + </li> + <li>change the permission on + <source><![CDATA[ +chown vfsusr.users /var/lib/apache2 + ]]></source> + </li> + <li>Activate the WebDAV module by adding 'dav' and 'dav_fs' to the list of modules in '/etc/sysconfig/apache2'. e.g <br/> + <source><![CDATA[ +APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config +mime negotiation setenvif ssl suexec userdir php4 php5 dav dav_fs"]]></source> + </li> + <li>Setup the webserver to use user-id 'vfsusr' and group 'users'. This can be done by changing the file '/etc/apache2/uid.conf'<br /> + <source><![CDATA[ +User vfsusr +Group users]]></source> + </li> + <li>Create the VFS user to access the Webdav resource<br /> + <source><![CDATA[ +htpasswd2 -cmb /etc/apache2/passwd vfsusr 'vfstest']]></source> + </li> + <li>Add the following to profiles section of settings.xml in the Maven home + directory. Modify the urls to match your setup. + <source><![CDATA[ + <profile> + <id>http</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <test.http.uri>http://vfsusr:[email protected]:80/vfstest/test-data</test.http.uri> + </properties> + </profile> + <profile> + <id>webdav</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <test.webdav.uri>webdav://vfsusr:[email protected]:80/vfstest/test-data</test.webdav.uri> + </properties> + </profile>]]></source> + </li> + </ol> + </subsection> + + <subsection name="Day CRX or Apache Jackrabbit"> + <ol> + <li>Use Windows Explorer, Mac Finder or a similar tool to connect to the + repository.</li> + <li>Create a vfstest directory</li> + <li>Drag the test-data from Explorer/Finder window to the repository window to + copy the files to the vfstest directory in the repository</li> + <li>Add the following to profiles section of settings.xml in the Maven home + directory. Modify the urls to match your setup. + <source><![CDATA[ + <profile> + <id>http</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <test.http.uri>http://admin:[email protected]:7402/vfstest/test-data</test.http.uri> + </properties> + </profile> + <profile> + <id>webdav</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <test.webdav.uri>webdav://admin:[email protected]:7402/vfstest/test-data</test.webdav.uri> + </properties> + </profile>]]></source> + </li> + </ol> + </subsection> + + <subsection name="Samba 3"> + <ol> + <li>Create a share 'vfsusr'<br /> + <source><![CDATA[ +[vfsusr] + comment = VFS Test Directory + path = /home/vfsusr + guest ok = yes + writable = yes]]></source> + </li> + <li>Setup a 'vfsusr' with password 'vfstest'<br /> + <source><![CDATA[ +smbpasswd -a vfsusr]]></source> + </li> + </ol> + </subsection> + + <subsection name="ssh"> + <ol> + <li>In '/etc/ssh/sshd_config' ensure<br /> + <source><![CDATA[ +PasswordAuthentication yes]]></source> + </li> + </ol> + </subsection> + + <subsection name="vsftp"> + <ol> + <li>Create a user 'vfsusr' with password 'vfstest' and home directory '/home/vfsusr' + <br/> + <source><![CDATA[ +useradd -p vfsusr -m vfsusr]]></source> + </li> + <li>In vfsuser's home directory create the directories + <ol> + <li>vfstest</li> + <li>vfstest/write-tests</li> + </ol> + </li> + <li>Copy the test data into the vfstest directory</li> + <li>Ensure the server is not disabled in the xinetd configuration<br /> + Set <source>disable=no</source> in '/etc/xinetd.d/vsftpd' + </li> + + <li>Setup the server config: '/etc/vsftpd.conf'<br/> + <source><![CDATA[ +write_enable=YES +local_enable=YES]]></source> + + <li>Add the following to profiles section of settings.xml in the Maven home + directory. Modify the urls to match your setup. + <source><![CDATA[ + <profile> + <id>ftp</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <test.ftp.uri>ftp://admin:[email protected]/vfstest/test-data</test.ftp.uri> + </properties> + </profile>]]></source> + </li> </li> + + </ol> + </subsection> + + <subsection name="Running tests"> + <p> + Running tests simply requires that the appropriate profile be activated. For + example, to run just the webdav test do + <code>mvn -P webdav test -Dtest=WebdavProviderTestCase</code>. Multipe tests + can be run by doing <code>mvn -P webdav -P http test</code>. + </p> + </subsection> + </section> + </body> +</document> \ No newline at end of file Added: synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testserver.xml URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testserver.xml?rev=1000332&view=auto ============================================================================== --- synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testserver.xml (added) +++ synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/testserver.xml Thu Sep 23 06:04:21 2010 @@ -0,0 +1,248 @@ +<!-- + 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>Setup a Testserver</title> + <author email="[email protected]">Mario Ivankovits</author> + </properties> + + <body> + <section name="Testserver"> + <p> + This documentation describes how to setup a VFS testserver needed during development for the junit + tests. + </p> + <p> + I tried to simplify things as good as I can, e.g. this setup uses for all server the same vfs work + directory. + Thus it is needed to setup apache to use user 'vfsusr' instead of 'wwwrun'. + <br/> + Based on this description it should be possible for you to avoid this "insecurity" if needed. + </p> + <p> + I created it during setup a fresh server based on the following components: + + <ol> + <li>SuSE Linux 9.3 Minimal Installation</li> + <li>Apache 2 Webserver (apache2-2.0.53)</li> + <li>Samba 3 (samba-3.0.12)</li> + <li>ssh (openssh-3.9p1)</li> + <li>vsftp (vsftpd-2.0.2-3)</li> + </ol> + </p> + + + <subsection name="System setup"> + <ol> + <li>You need maven to build the local test-data structure. This is done automatically during build of VFS.</li> + <li>Create a user 'vfsusr' with password 'vfs/%\te:st' and home directory '/home/vfsusr' + <br/> + <source><![CDATA[ +useradd -p vfsusr -m vfsusr + ]]></source> + </li> + <li>Create the directories + <ol> + <li>/vfstest</li> + <li>/vfstest/write-tests</li> + </ol> + and copy from your local 'target/test-data' the directories + <source>code,read-tests</source> into it.<br /> + Now your structure looks like this:<br /> + <source><![CDATA[ +/vfstest +/vfstest/write-tests +/vfstest/read-tests +/vfstest/read-tests/emptydir +/vfstest/read-tests/file1.txt +/vfstest/read-tests/dir1 +/vfstest/read-tests/dir1/file1.txt +/vfstest/read-tests/dir1/file2.txt +/vfstest/read-tests/dir1/file3.txt +/vfstest/read-tests/dir1/subdir1 +/vfstest/read-tests/dir1/subdir1/file1.txt +/vfstest/read-tests/dir1/subdir1/file2.txt +/vfstest/read-tests/dir1/subdir1/file3.txt +/vfstest/read-tests/dir1/subdir2 +/vfstest/read-tests/dir1/subdir2/file1.txt +/vfstest/read-tests/dir1/subdir2/file2.txt +/vfstest/read-tests/dir1/subdir2/file3.txt +/vfstest/read-tests/dir1/subdir3 +/vfstest/read-tests/dir1/subdir3/file1.txt +/vfstest/read-tests/dir1/subdir3/file2.txt +/vfstest/read-tests/dir1/subdir3/file3.txt +/vfstest/read-tests/empty.txt +/vfstest/read-tests/file%.txt +/vfstest/code +/vfstest/code/sealed +/vfstest/code/sealed/AnotherClass.class +/vfstest/code/ClassToLoad.class + ]]></source> + </li> + <li>Setup a symbolic link to '/vfstest'<br /> + <source><![CDATA[ +ln -s /vfstest /home/vfsusr/vfstest + ]]></source> + </li> + <li>Set permissions + <br/> + <source><![CDATA[ +find /vfstest -print0 | xargs -0 chown vfsusr.users + ]]></source> + </li> + <li>After you followed the steps below and setup the server ensure they + are activated and running.<br /> + This is only needed if you installed a fresh system. Otherwise simply restart them. + <br/> + <source><![CDATA[ +insserv xinetd +insserv apache2 +insserv smb +insserv nmb +/etc/rc.d/xinetd restart +/etc/rc.d/apache2 restart +/etc/rc.d/smb restart +/etc/rc.d/nmb restart + ]]></source> + </li> + </ol> + </subsection> + + <subsection name="Apache 2 Webserver"> + <ol> + <li>Create a file named '/etc/apache2/conf.d/vfstest.conf' with this content<br /> + <source><![CDATA[ +# +# VFSTEST +# +Alias /vfstest /vfstest/ + +DAVLockDB /var/lib/apache2/dav.lockDB +DAVMinTimeout 600 + +<Directory /vfstest> + Options None + AllowOverride None + Order allow,deny + Allow from all +</Directory> + +<Location /> + DAV On + Options Indexes MultiViews + AllowOverride None + + AuthType Basic + AuthName vfstest_zone + AuthUserFile /etc/apache2/passwd + <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> + Require user vfsusr + </Limit> +</Location> + ]]></source> + </li> + <li>change the permission on + <source><![CDATA[ +chown vfsusr.users /var/lib/apache2 + ]]></source> + </li> + <li>Activate the WebDAV module by adding 'dav' and 'dav_fs' to the list of modules in '/etc/sysconfig/apache2'. e.g <br/> + <source><![CDATA[ +APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config +mime negotiation setenvif ssl suexec userdir php4 php5 dav dav_fs" + ]]></source> + </li> + <li>Setup the webserver to use user-id 'vfsusr' and group 'users'. This can be done by changing the file '/etc/apache2/uid.conf'<br /> + <source><![CDATA[ +User vfsusr +Group users + ]]></source> + </li> + <li>Create the VFS user to access the Webdav resource<br /> + <source><![CDATA[ +htpasswd2 -cmb /etc/apache2/passwd vfsusr 'vfs/%\te:st' + ]]></source> + </li> + </ol> + </subsection> + + <subsection name="Samba 3"> + <ol> + <li>Create a share 'vfsusr'<br /> + <source><![CDATA[ +[vfsusr] + comment = VFS Test Directory + path = /home/vfsusr + guest ok = yes + writable = yes + ]]></source> + </li> + <li>Setup a 'vfsusr' with password 'vfs/%\te:st'<br /> + <source><![CDATA[ +smbpasswd -a vfsusr + ]]></source> + </li> + </ol> + </subsection> + + <subsection name="ssh"> + <ol> + <li>In '/etc/ssh/sshd_config' ensure<br /> + <source><![CDATA[ +PasswordAuthentication yes + ]]></source> + </li> + </ol> + </subsection> + + <subsection name="vsftp"> + <ol> + <li>Ensure the server is not disabled in the xinetd configuration<br /> + Set <source>disable=no</source> in '/etc/xinetd.d/vsftpd' + </li> + + <li>Setup the server config: '/etc/vsftpd.conf'<br/> + <source> +write_enable=YES +local_enable=YES + </source> + + </li> + </ol> + </subsection> + + <subsection name="Tests"> + Now we are finished and you can try to activate the tests by + <ol> + <li>reactivate the tests in 'build.xml'.<br/> + Search for <code><![CDATA[<!-- tests disabled -->]]></code> and comment the exclude.</li> + <source><![CDATA[ +<!-- tests disabled +<exclude name="**/*.java"> +</exclude> + --> + ]]></source> + <li>or use the class org.apache.commons.vfs.RunTest where you have + to adapt some properties at the top of the file and choose which test + you would like to run by comment the others.<br /> + This is the way how I debug a failed testcase. + </li> + </ol> + </subsection> + </section> + </body> +</document> \ No newline at end of file Added: synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/todo.xml URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/todo.xml?rev=1000332&view=auto ============================================================================== --- synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/todo.xml (added) +++ synapse/branches/commons-vfs-2-synapse-2.0/src/site/xdoc/todo.xml Thu Sep 23 06:04:21 2010 @@ -0,0 +1,156 @@ +<?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>TODO</title> + <author email="[email protected]">James Strachan</author> + <author email="[email protected]">Adam Murdoch</author> + <author email="[email protected]">Mario Ivankovits</author> + </properties> + + <body> + <section name="TODO"> + <p> + The following is a list of items that need to be completed. + Contributions are welcome! + </p> + + <subsection name="Release 1.1"> + <ul> + <li>moveTo should handle a directory move if it moves from a different filesystem.</li> + </ul> + </subsection> + + <subsection name="Open"> + <ul> + <li>More documentation (status, file naming etc).</li> + <li>Fix the + <a href="task-list.html">TODO items</a> in the code. + </li> + <li>Add more providers: + <ul> + <li>rsync</li> + <li>subversion</li> + + <li>nfs</li> + <li>cvs</li> + <li>jdbc filesystem</li> + <li>xml filesystem</li> + <li>jndi</li> + <li>imap</li> + <li>local mirror</li> + <li>spidering http</li> + <li>...</li> + </ul> + </li> + <li>JNDI integration.</li> + <li>Formalise the provider API.</li> + <li>WebDAV Provider: + <ul> + <li>Add plain http support, and auto-detect dav resources.</li> + <li>Add set last-modified.</li> + <li>HTTPS</li> + </ul> + </li> + <li>Zip/Jar Provider: + <ul> + <li>Extract an AbstractLayerFileSystem out of ZipFileSystem.</li> + <li> + Track changes to the parent layer. Eg when the + parent layer is deleted, mark all the files in the + fs as 'does-not-exist'. + </li> + <li>Add support for writing to zip/jar files.</li> + </ul> + </li> + <li>URL Provider: + <ul> + <li>Support attributes.</li> + </ul> + </li> + <li>HTTP Provider: + <ul> + <li>Support attributes.</li> + <li>HTTPS support.</li> + </ul> + </li> + <li> + The local disk caching mechanism also needs more work. Needs + to check last-modified time. Replicator needs to be more + configurable. + </li> + <li>Add persistent replicator.</li> + <li> + Finish support for junctions: Make ancestors of a junction + point visible, fire events when junction is added or removed, + tests. + </li> + <li> + Add support for federation (ie transparently crossing file + system boundaries, such as drilling down into the contents + of a Jar file). + </li> + <li>Add an equivalent of the fileScanner Jelly tag.</li> + <li> + Add an equivalent of Ant path, fileset, dirset, filelist, etc. + Ideally, these can be abstracted into a single data type. + </li> + <li> + Allow selectors, name mappers, and filters to be specified + for the Ant tasks. + </li> + <li>Add capabilities to FileObject.</li> + <li>Attributes and attribute schema.</li> + <li> + Handle file canonicalisation better (for cases like + case-insensitive file systems, symbolic links, name mangling, etc). + </li> + <li>Add more selectors: XPath, Ant style, regular expression.</li> + <li>Add adaptor (NodePointerFactory?) for use with JXpath.</li> + <li> + Add content-changed, attribute-changed, and move events to + FileListener. Maybe split into structure and content + listeners. + </li> + <li>Get/set the file permissions.</li> + <li>Automatically checksum and/or verify remote files.</li> + <li> + Look at adding native code for fine-grained control over + permissions, file monitoring, faster moves, etc. Must be + optional - the thing should still build and run without the + native code. + </li> + </ul> + </subsection> + </section> + + <section name="Library upgrades"> + <p> + The following describes things I discovered during testing newer dependencies. + </p> + + <subsection name="webdavlib 2.1"> + <ul> + <li>resource.listWebdavResources() do no longer list directories?<br />Figure out what to do</li> + </ul> + </subsection> + + </section> + </body> +</document> \ No newline at end of file Added: synapse/branches/commons-vfs-2-synapse-2.0/xdocs/api.html URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/xdocs/api.html?rev=1000332&view=auto ============================================================================== --- synapse/branches/commons-vfs-2-synapse-2.0/xdocs/api.html (added) +++ synapse/branches/commons-vfs-2-synapse-2.0/xdocs/api.html Thu Sep 23 06:04:21 2010 @@ -0,0 +1,379 @@ +<!-- + 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>Using The API</title> + <author email="[email protected]">Adam Murdoch</author> + </properties> + + <body> + <section name="Using The API"> + <p> + The + <a href="apidocs/org/apache/commons/vfs/FileSystemManager.html">FileSystemManager</a> + interface provides access to Commons VFS. Using this interface + you can locate files and create file systems. + There are a + <a href="#Configuring Commons VFS">number of ways</a> + to obtain a + <code>FileSystemManager</code> instance. + The simplest is to use the static + <a href="apidocs/org/apache/commons/vfs/VFS.html#getManager()">VFS.getManager()</a> + method, which returns the default Commons VFS implementation. + </p> + + <p> + Once you have a + <code>FileSystemManager</code>, you can use its + <code>resolveFile()</code> methods to locate a file by name. + For example: + </p> + + <source><![CDATA[ +FileSystemManager fsManager = VFS.getManager(); +FileObject jarFile = fsManager.resolveFile( "jar:lib/aJarFile.jar" ); + ]]></source> + + <p> + Each file is represented by a + <a href="apidocs/org/apache/commons/vfs/FileObject.html">FileObject</a> + instance. Using this interface you can create or delete the + file, list its children, read or write its content, and so on. + For example: + </p> + + <source><![CDATA[ +// Locate the Jar file +FileSystemManager fsManager = VFS.getManager(); +FileObject jarFile = fsManager.resolveFile( "jar:lib/aJarFile.jar" ); + +// List the children of the Jar file +FileObject[] children = jarFile.getChildren(); +System.out.println( "Children of " + jarFile.getName().getURI() ); +for ( int i = 0; i < children.length; i++ ) +{ + System.out.println( children[ i ].getName().getBaseName() ); +} + ]]></source> + + <p> + In some cases you might want to explicitely free resources allocated by the filesystem. + You can do this by calling + <a href="apidocs/org/apache/commons/vfs/FileSystemManager.html#closeFileSystem">VFS.getManager().closeFileSystem(fs)</a>. + If you use VFS as singleton (as described above) you should take care that this will close the filesystem for + all threads.<br /> + In other words, do not close any globally used filesystem like the one for local files. + </p> + + <p> + See the + <a href="apidocs/org/apache/commons/vfs/FileObject.html">FileObject</a> + Javadocs for more detail. + </p> + + <subsection name="Cache"> + <p> + Commons VFS uses a <a href="apidocs/org/apache/commons/vfs/cache/SoftRefFilesCache.html">SoftRefFilesCache</a> to release memory if a file is no longer used by the application. + </p> + <p> + This cache will return the same instance for a file as long as it is "strongly reachable" e.g. you + hold a reference to this object. If the FileObject is no longer reachable, and the jvm needs some memory, + it will be released. + </p> + <p> + There is also a internal cache of each file object avoid the need to access the network layer. Now its possible + to configure this behviour through the use of <a href="apidocs/org/apache/commons/vfs/CacheStrategy.html">CacheStrategy</a>. + <br /> + Do this on the DefaultFileSystemManager. For example: + <code> + ((DefaultFileSystemManager) VFS.getManager()).setCacheStrategy(CacheStrategy.ON_CALL) + </code> + </p> + </subsection> + + <subsection name="User Authentication"> + <p> + You can put the credentials into the url, but the drawback here is, that it is + easily possible to get access to the password. + </p> + <p> + To solve you can use the + <a href="apidocs/org/apache/commons/vfs/UserAuthenticator.html">UserAuthenticator</a> + </p> + <p> + For example: + <code> + StaticUserAuthenticator auth = new StaticUserAuthenticator("username", "password", null); + FileSystemOptions opts = new FileSystemOptions(); + DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth); + + FileObject fo = VFS.getManager().resolveFile("smb://host/anyshare/dir", opts); + </code> + </p> + <p> + Internally the UserAuthenticator uses char arrays which will be zeroed before it is + freed for garbage collection.Unhappily none of the current libraries use char + arrays and so VFS has to create a string. Thus, the main advantage + of this solution - security - is lost, but hey, thats not VFS fault ;-) + </p> + <p> + VFS calls <code>UserAuthenticator.requestAuthentication</code> each time it + requires credentials, it depends on the filesystem implementation how often + this might be. For example, with FTP this is on every connection, in SMB/JCIFS + this is for EVERY OBJECT. It is up to you how long you will cache credentials + of if you would like to provide a "save credentials" checkbox. + </p> + </subsection> + + <subsection name="Examples"> + <p> + For an example of using the API, take a look at the classes + in the + <a href="apidocs/org/apache/commons/vfs/example/package-summary.html">example</a> + package. + </p> + </subsection> + + </section> + + <section name="Configuring Commons VFS"> + <p> + Commons VFS is represented using the + <a href="apidocs/org/apache/commons/vfs/FileSystemManager.html">FileSystemManager</a> + interface. There are a number of ways to create and configure a + <code>FileSystemManager</code> instance. + </p> + <p> + The simplest method is to use the static + <a href="apidocs/org/apache/commons/vfs/VFS.html#getManager()">VFS.getManager()</a> + method, which returns the default Commons VFS implementation. + </p> + <p> + This method will also automatically scan the classpath for a /META-INF/vfs-providers.xml file + (also in jar files). + If such a file is found Commons VFS uses it in <u>addition</u> to the default providers.xml. + This allows you to start using a new filesystem by simply drop its implementation into the classpath. + The configuration file format is described below.<br /> + <b>Notice:</b> Currently it is not allowed to override a already configured filesystem. Commons VFS throws + an exception if there is already a filesystem for a scheme. + </p> + + <p> + To configure Commons VFS programatically, you can create an + instance of + <a href="apidocs/org/apache/commons/vfs/impl/DefaultFileSystemManager.html">DefaultFileSystemManager</a> + and configure it manually. The default constructor + <code>DefaultFileSystemManager</code> creates a manager that + is completely empty. You will have to add file providers to it + to make it do anything useful. + </p> + <p> + Here are the steps for using + <code>DefaultFileSystemManager</code>: + </p> + <ol> + <li>Create a new instance.</li> + <li> + Set the logger for the manager and all its components, + using + <code>setLogger()</code>. This step is + optional, and if skipped, the manager will use the default + logger provided by Commons Logging. + </li> + <li> + Add file providers, using + <code>addProvider()</code>. + </li> + <li> + Set the default provider, using + <code>setDefaultProvider()</code>. This step is optional. + See + <a href="apidocs/org/apache/commons/vfs/provider/url/UrlFileProvider.html">UrlFileProvider</a> + for a useful default provider. + </li> + <li> + Set the file replicator, using + <code>setReplicator()</code>. + This step is optional. + </li> + <li> + Set the temporary file store, using + <code>setTemporaryFileStore()</code>. + This step is optional. + </li> + <li> + Set the base file using + <code>setBaseFile()</code>. The + base file is used to resolve relative URI passed to + <code>resolveFile()</code>. This step is optional. + </li> + <li> + Initialise the manager using + <code>init()</code>. + </li> + </ol> + <p> + You should make sure that you call + <code>close()</code> on the + manager when you are finished with it. + </p> + + <p> + The third method for configuring Commons VFS, is to configure + it from a file. Create an instance of + <a href="apidocs/org/apache/commons/vfs/impl/StandardFileSystemManager.html">StandardFileSystemManager</a>, + and use its + <code>setConfiguration()</code> method to set the + location of the configuration file to use. The configuration + file format is described below. + </p> + + <p> + <code>StandardFileSystemManager</code> is a subclass of + <code>DefaultFileSystemManager</code>, so you can also + configure it programmatically, as described above. + </p> + <subsection name="Configuration File"> + <p> + The configuration file is an XML file. The root element + of the configuration file should be a + <code><providers></code> element. + The + <code><providers></code> element may contain: + </p> + <ul> + <li>Zero or more + <code><provider></code> elements. + </li> + <li>An optional + <code><default-provider></code> element. + </li> + <li>Zero or more + <code><extension-map></code> elements. + </li> + <li>Zero or more + <code><mime-type-map></code> elements. + </li> + </ul> + + <p> + <b> + <code><provider></code> + </b> + </p> + <p> + The + <code><provider></code> element defines a file + provider. It must have a + <code>class-name</code> attribute, + which specifies the fully-qualified name of the provider + class. The provider class must be public, and must have a + public constructor with an FileSystemManager argument which + allows the systems to pass the used filesystem manager. + </p> + <p> + The + <code><provider></code> element may contain + zero or more + <code><scheme></code> elements, + and zero or more + <code><if-available></code> elements. + </p> + <p> + The + <code><scheme></code> element defines a URI scheme + that the provider will handle. It must have a + <code>name</code> attribute, which specifies the URI scheme. + </p> + <p> + The + <code><if-available></code> elements is used to + disable the provider if certain classes are not present in + the class-path. + It must have a + <code>class-name</code> attribute, which + specifies the fully qualified name of a class to test for. + If the class cannot be found, the provider is not registered. + </p> + + <p> + <b> + <code><default-provider></code> + </b> + </p> + <p> + The + <code><default-provider></code> element defines + the default provider. It has the same format as the + <code><provider></code> element. + </p> + + <p> + <b> + <code><extension-map></code> + </b> + </p> + <p> + The + <code><extension-map></code> element defines + a mapping from a file's extension to the provider that + should handle files with that extension. + It must have an + <code>extension</code> attribute, which + specifies the extension, and a + <code>scheme</code> attribute, + which specifies the URI scheme of the provider. + </p> + + <p> + <b> + <code><mime-type-map></code> + </b> + </p> + <p> + The + <code><mime-type-map></code> element defines + a mapping from a file's MIME type to the provider that + should handle files with that MIME type. + It must have an + <code>mime-type</code> attribute, which + specifies the MIME type, and a + <code>scheme</code> attribute, + which specified the URI scheme of the provider. + </p> + + <p> + Below is an example configuration file: + </p> + <source><![CDATA[ +<providers> + <provider class-name="org.apache.commons.vfs.provider.zip.ZipFileProvider"> + <scheme name="zip"/> + </provider> + <extension-map extension="zip" scheme="zip"/> + <mime-type-map mime-type="application/zip" scheme="zip"/> + <provider class-name="org.apache.commons.vfs.provider.ftp.FtpFileProvider"> + <scheme name="ftp"/> + <if-available class-name="org.apache.commons.net.ftp.FTPFile"/> + </provider> + <default-provider class-name="org.apache.commons.vfs.provider.url.UrlFileProvider"/> +</providers> + ]]></source> + </subsection> + </section> + </body> +</document> \ No newline at end of file
