You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ra...@apache.org on 2010/09/23 08:04:34 UTC
svn commit: r1000332 [24/27] - in
/synapse/branches/commons-vfs-2-synapse-2.0: ./ core/ core/src/
core/src/main/ core/src/main/java/ core/src/main/java/org/
core/src/main/java/org/apache/ core/src/main/java/org/apache/commons/
core/src/main/java/org/ap...
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.tbz2
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.tgz
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.tgz?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.tgz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.zip
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.zip?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/nested.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file1.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file1.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file1.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file1.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file2.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file2.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file2.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file2.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file3.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file3.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file3.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/file3.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file1.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file1.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file1.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file1.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file2.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file2.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file2.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file2.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file3.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file3.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file3.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir1/file3.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file1.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file1.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file1.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file1.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file2.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file2.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file2.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file2.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file3.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file3.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file3.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir2/file3.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file1.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file1.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file1.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file1.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file2.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file2.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file2.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file2.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file3.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file3.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file3.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/dir1/subdir3/file3.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+A test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/empty.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/empty.txt?rev=1000332&view=auto
==============================================================================
(empty)
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file space.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file%20space.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file space.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file space.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+This is a test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file%.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file%25.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file%.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file%.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+This is a test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file1.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file1.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file1.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/read-tests/file1.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+This is a test file.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.jar
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.jar?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.mf
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.mf?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.mf (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.mf Thu Sep 23 06:04:21 2010
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Specification-Title: SpecTitle
+Specification-Vendor: SpecVendor
+Specification-Version: 1.0
+Implementation-Title: ImplTitle
+Implementation-Vendor: ImplVendor
+Implementation-Version: 1.1
+Sealed: false
+
+Name: code/sealed/
+Sealed: true
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.policy
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.policy?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.policy (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.policy Thu Sep 23 06:04:21 2010
@@ -0,0 +1,69 @@
+
+// Standard extensions get all permissions by default
+
+grant codeBase "file:${java.home}/lib/ext/*" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${maven.home}/-" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${maven.build.dest}" {
+ permission java.io.FilePermission "${user.dir}/vfs_cache/-", "read, write, delete";
+ permission java.io.FilePermission "${user.dir}/vfs_cache", "read, write, delete";
+ permission java.io.FilePermission "${user.dir}", "read";
+ permission java.net.NetPermission "specifyStreamHandler";
+};
+
+// default permissions granted to all domains
+
+grant {
+ permission java.io.FilePermission "${test.basedir}/write-tests", "read, write, delete";
+ permission java.io.FilePermission "${test.basedir}/write-tests/-", "read, write, delete";
+ permission java.io.FilePermission "${test.basedir}/-", "read";
+ permission java.io.FilePermission "${test.basedir}", "read";
+
+ //This is needed for the ClassLoader tests.
+ permission java.lang.RuntimePermission "createClassLoader";
+
+ // Allows any thread to stop itself using the java.lang.Thread.stop()
+ // method that takes no argument.
+ // Note that this permission is granted by default only to remain
+ // backwards compatible.
+ // It is strongly recommended that you either remove this permission
+ // from this policy file or further restrict it to code sources
+ // that you specify, because Thread.stop() is potentially unsafe.
+ // See "http://java.sun.com/notes" for more information.
+ permission java.lang.RuntimePermission "stopThread";
+
+ // allows anyone to listen on un-privileged ports
+ permission java.net.SocketPermission "localhost:1024-", "listen";
+
+ // "standard" properies that can be read by anyone
+
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+ permission java.util.PropertyPermission "test.basedir", "read";
+ permission java.util.PropertyPermission "user.dir", "read";
+};
+
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tar
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tar?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tbz2
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tbz2?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tbz2
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tgz
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tgz?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.tgz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.zip
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.zip?rev=1000332&view=auto
==============================================================================
Binary file - no diff available.
Propchange: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/test.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/write-tests/dummy.txt
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/write-tests/dummy.txt?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/write-tests/dummy.txt (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/core/src/test/resources/test-data/write-tests/dummy.txt Thu Sep 23 06:04:21 2010
@@ -0,0 +1 @@
+dummy file to cause directory to be created.
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/doap_vfs.rdf
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/doap_vfs.rdf?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/doap_vfs.rdf (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/doap_vfs.rdf Thu Sep 23 06:04:21 2010
@@ -0,0 +1,49 @@
+<?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.
+ -->
+<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:asfext="http://projects.apache.org/ns/asfext#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:doap="http://usefulinc.com/ns/doap#" xml:lang="en">
+ <Project rdf:about="http://commons.apache.org/vfs/">
+ <name>Apache Commons VFS</name>
+ <homepage rdf:resource="http://commons.apache.org/vfs/"/>
+ <programming-language>Java</programming-language>
+ <category rdf:resource="http://projects.apache.org/category/library"/>
+ <license rdf:resource="http://usefulinc.com/doap/licenses/asl20"/>
+ <bug-database rdf:resource="http://issues.apache.org/jira/browse/VFS"/>
+ <download-page rdf:resource="http://commons.apache.org/vfs/download_vfs.cgi"/>
+ <asfext:pmc rdf:resource="http://commons.apache.org/"/>
+ <shortdesc xml:lang="en">Commons VFS</shortdesc>
+ <description xml:lang="en">
+ VFS is a Virtual File System library.
+ </description>
+ <repository>
+ <SVNRepository>
+ <browse rdf:resource="http://svn.apache.org/viewvc"/>
+ <location rdf:resource="http://svn.apache.org/repos/asf/commons/proper/vfs"/>
+ </SVNRepository>
+ </repository>
+ <!--
+ <release>
+ <Version>
+ <name>??</name>
+ <created>yyyy-mm-dd</created>
+ <revision>??</revision>
+ </Version>
+ </release>
+ -->
+ <mailing-list rdf:resource="http://commons.apache.org/mail-lists.html"/>
+ </Project>
+</rdf:RDF>
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/pom.xml
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/pom.xml?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/pom.xml (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/pom.xml Thu Sep 23 06:04:21 2010
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Commons VFS Examples</name>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-examples</artifactId>
+ <version>2.0-21092010</version>
+ <description>VFS is a Virtual File System library - Examples.</description>
+
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-project</artifactId>
+ <version>2.0-21092010</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-net</groupId>
+ <artifactId>commons-net</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <commons.componentid>vfs-examples</commons.componentid>
+ <vfs.parent.dir>${basedir}/..</vfs.parent.dir>
+ </properties>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>..</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>NOTICE.txt</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>..</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+</project>
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ChangeLastModificationTime.java
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ChangeLastModificationTime.java?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ChangeLastModificationTime.java (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ChangeLastModificationTime.java Thu Sep 23 06:04:21 2010
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.commons.vfs.example;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.VFS;
+
+/**
+ * Simply changed the last modification time of the given file
+ *
+ * @author imario@apache.org
+ */
+public class ChangeLastModificationTime
+{
+ public static void main(String[] args) throws Exception
+ {
+ if (args.length == 0)
+ {
+ System.err.println("Please pass the name of a file as parameter.");
+ return;
+ }
+
+ FileObject fo = VFS.getManager().resolveFile(args[0]);
+ long setTo = System.currentTimeMillis();
+ System.err.println("set to: " + setTo);
+ fo.getContent().setLastModifiedTime(setTo);
+ System.err.println("after set: " + fo.getContent().getLastModifiedTime());
+ }
+}
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/Shell.java
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/Shell.java?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/Shell.java (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/Shell.java Thu Sep 23 06:04:21 2010
@@ -0,0 +1,363 @@
+/*
+ * 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.
+ */
+package org.apache.commons.vfs.example;
+
+import org.apache.commons.vfs.FileContent;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileSystemManager;
+import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.FileUtil;
+import org.apache.commons.vfs.Selectors;
+import org.apache.commons.vfs.VFS;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.StringTokenizer;
+
+/**
+ * A simple command-line shell for performing file operations.
+ *
+ * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
+ * @author Gary D. Gregory
+ * @version $Id:Shell.java 232419 2005-08-13 07:23:40 +0200 (Sa, 13 Aug 2005) imario $
+ */
+public class Shell
+{
+ private static final String CVS_ID = "$Id:Shell.java 232419 2005-08-13 07:23:40 +0200 (Sa, 13 Aug 2005) imario $";
+ private final FileSystemManager mgr;
+ private FileObject cwd;
+ private BufferedReader reader;
+
+ public static void main(final String[] args)
+ {
+ try
+ {
+ (new Shell()).go();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ System.exit(1);
+ }
+ System.exit(0);
+ }
+
+ private Shell() throws FileSystemException
+ {
+ mgr = VFS.getManager();
+ cwd = mgr.resolveFile(System.getProperty("user.dir"));
+ reader = new BufferedReader(new InputStreamReader(System.in));
+ }
+
+ private void go() throws Exception
+ {
+ System.out.println("VFS Shell [" + CVS_ID + "]");
+ while (true)
+ {
+ final String[] cmd = nextCommand();
+ if (cmd == null)
+ {
+ return;
+ }
+ if (cmd.length == 0)
+ {
+ continue;
+ }
+ final String cmdName = cmd[0];
+ if (cmdName.equalsIgnoreCase("exit") || cmdName.equalsIgnoreCase("quit"))
+ {
+ return;
+ }
+ try
+ {
+ handleCommand(cmd);
+ }
+ catch (final Exception e)
+ {
+ System.err.println("Command failed:");
+ e.printStackTrace(System.err);
+ }
+ }
+ }
+
+ /**
+ * Handles a command.
+ */
+ private void handleCommand(final String[] cmd) throws Exception
+ {
+ final String cmdName = cmd[0];
+ if (cmdName.equalsIgnoreCase("cat"))
+ {
+ cat(cmd);
+ }
+ else if (cmdName.equalsIgnoreCase("cd"))
+ {
+ cd(cmd);
+ }
+ else if (cmdName.equalsIgnoreCase("cp"))
+ {
+ cp(cmd);
+ }
+ else if (cmdName.equalsIgnoreCase("help"))
+ {
+ help();
+ }
+ else if (cmdName.equalsIgnoreCase("ls"))
+ {
+ ls(cmd);
+ }
+ else if (cmdName.equalsIgnoreCase("pwd"))
+ {
+ pwd();
+ }
+ else if (cmdName.equalsIgnoreCase("rm"))
+ {
+ rm(cmd);
+ }
+ else if (cmdName.equalsIgnoreCase("touch"))
+ {
+ touch(cmd);
+ }
+ else
+ {
+ System.err.println("Unknown command \"" + cmdName + "\".");
+ }
+ }
+
+ /**
+ * Does a 'help' command.
+ */
+ private void help()
+ {
+ System.out.println("Commands:");
+ System.out.println("cat <file> Displays the contents of a file.");
+ System.out.println("cd [folder] Changes current folder.");
+ System.out.println("cp <src> <dest> Copies a file or folder.");
+ System.out.println("help Shows this message.");
+ System.out.println("ls [-R] [path] Lists contents of a file or folder.");
+ System.out.println("pwd Displays current folder.");
+ System.out.println("rm <path> Deletes a file or folder.");
+ System.out.println("touch <path> Sets the last-modified time of a file.");
+ System.out.println("exit Exits this program.");
+ System.out.println("quit Exits this program.");
+ }
+
+ /**
+ * Does an 'rm' command.
+ */
+ private void rm(final String[] cmd) throws Exception
+ {
+ if (cmd.length < 2)
+ {
+ throw new Exception("USAGE: rm <path>");
+ }
+
+ final FileObject file = mgr.resolveFile(cwd, cmd[1]);
+ file.delete(Selectors.SELECT_SELF);
+ }
+
+ /**
+ * Does a 'cp' command.
+ */
+ private void cp(final String[] cmd) throws Exception
+ {
+ if (cmd.length < 3)
+ {
+ throw new Exception("USAGE: cp <src> <dest>");
+ }
+
+ final FileObject src = mgr.resolveFile(cwd, cmd[1]);
+ FileObject dest = mgr.resolveFile(cwd, cmd[2]);
+ if (dest.exists() && dest.getType() == FileType.FOLDER)
+ {
+ dest = dest.resolveFile(src.getName().getBaseName());
+ }
+
+ dest.copyFrom(src, Selectors.SELECT_ALL);
+ }
+
+ /**
+ * Does a 'cat' command.
+ */
+ private void cat(final String[] cmd) throws Exception
+ {
+ if (cmd.length < 2)
+ {
+ throw new Exception("USAGE: cat <path>");
+ }
+
+ // Locate the file
+ final FileObject file = mgr.resolveFile(cwd, cmd[1]);
+
+ // Dump the contents to System.out
+ FileUtil.writeContent(file, System.out);
+ System.out.println();
+ }
+
+ /**
+ * Does a 'pwd' command.
+ */
+ private void pwd()
+ {
+ System.out.println("Current folder is " + cwd.getName());
+ }
+
+ /**
+ * Does a 'cd' command.
+ * If the taget directory does not exist, a message is printed to <code>System.err</code>.
+ */
+ private void cd(final String[] cmd) throws Exception
+ {
+ final String path;
+ if (cmd.length > 1)
+ {
+ path = cmd[1];
+ }
+ else
+ {
+ path = System.getProperty("user.home");
+ }
+
+ // Locate and validate the folder
+ FileObject tmp = mgr.resolveFile(cwd, path);
+ if (tmp.exists())
+ {
+ cwd = tmp;
+ }
+ else
+ {
+ System.out.println("Folder does not exist: " + tmp.getName());
+ }
+ System.out.println("Current folder is " + cwd.getName());
+ }
+
+ /**
+ * Does an 'ls' command.
+ */
+ private void ls(final String[] cmd) throws FileSystemException
+ {
+ int pos = 1;
+ final boolean recursive;
+ if (cmd.length > pos && cmd[pos].equals("-R"))
+ {
+ recursive = true;
+ pos++;
+ }
+ else
+ {
+ recursive = false;
+ }
+
+ final FileObject file;
+ if (cmd.length > pos)
+ {
+ file = mgr.resolveFile(cwd, cmd[pos]);
+ }
+ else
+ {
+ file = cwd;
+ }
+
+ if (file.getType() == FileType.FOLDER)
+ {
+ // List the contents
+ System.out.println("Contents of " + file.getName());
+ listChildren(file, recursive, "");
+ }
+ else
+ {
+ // Stat the file
+ System.out.println(file.getName());
+ final FileContent content = file.getContent();
+ System.out.println("Size: " + content.getSize() + " bytes.");
+ final DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
+ final String lastMod = dateFormat.format(new Date(content.getLastModifiedTime()));
+ System.out.println("Last modified: " + lastMod);
+ }
+ }
+
+ /**
+ * Does a 'touch' command.
+ */
+ private void touch(final String[] cmd) throws Exception
+ {
+ if (cmd.length < 2)
+ {
+ throw new Exception("USAGE: touch <path>");
+ }
+ final FileObject file = mgr.resolveFile(cwd, cmd[1]);
+ if (!file.exists())
+ {
+ file.createFile();
+ }
+ file.getContent().setLastModifiedTime(System.currentTimeMillis());
+ }
+
+ /**
+ * Lists the children of a folder.
+ */
+ private void listChildren(final FileObject dir,
+ final boolean recursive,
+ final String prefix)
+ throws FileSystemException
+ {
+ final FileObject[] children = dir.getChildren();
+ for (int i = 0; i < children.length; i++)
+ {
+ final FileObject child = children[i];
+ System.out.print(prefix);
+ System.out.print(child.getName().getBaseName());
+ if (child.getType() == FileType.FOLDER)
+ {
+ System.out.println("/");
+ if (recursive)
+ {
+ listChildren(child, recursive, prefix + " ");
+ }
+ }
+ else
+ {
+ System.out.println();
+ }
+ }
+ }
+
+ /**
+ * Returns the next command, split into tokens.
+ */
+ private String[] nextCommand() throws IOException
+ {
+ System.out.print("> ");
+ final String line = reader.readLine();
+ if (line == null)
+ {
+ return null;
+ }
+ final ArrayList cmd = new ArrayList();
+ final StringTokenizer tokens = new StringTokenizer(line);
+ while (tokens.hasMoreTokens())
+ {
+ cmd.add(tokens.nextToken());
+ }
+ return (String[]) cmd.toArray(new String[cmd.size()]);
+ }
+}
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ShowProperties.java
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ShowProperties.java?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ShowProperties.java (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/ShowProperties.java Thu Sep 23 06:04:21 2010
@@ -0,0 +1,102 @@
+/*
+* 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.
+ */
+package org.apache.commons.vfs.example;
+
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystemException;
+import org.apache.commons.vfs.FileSystemManager;
+import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.VFS;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+/**
+ * A simple that prints the properties of the file passed as first parameter.
+ *
+ * @author <a href="mailto:anthony@antcommander.com">Anthony Goubard</a>
+ * @version $Revision:232419 $ $Date:2005-08-13 07:23:40 +0200 (Sa, 13 Aug 2005) $
+ */
+
+
+public class ShowProperties
+{
+ public static void main(String[] args)
+ {
+ if (args.length == 0)
+ {
+ System.err.println("Please pass the name of a file as parameter.");
+ System.err.println("e.g. java org.apache.commons.vfs.example.ShowProperties LICENSE.txt");
+ return;
+ }
+ for (int i = 0; i < args.length; i++)
+ {
+ try
+ {
+ FileSystemManager mgr = VFS.getManager();
+ System.out.println();
+ System.out.println("Parsing: " + args[i]);
+ FileObject file = mgr.resolveFile(args[i]);
+ System.out.println("URL: " + file.getURL());
+ System.out.println("getName(): " + file.getName());
+ System.out.println("BaseName: " + file.getName().getBaseName());
+ System.out.println("Extension: " + file.getName().getExtension());
+ System.out.println("Path: " + file.getName().getPath());
+ System.out.println("Scheme: " + file.getName().getScheme());
+ System.out.println("URI: " + file.getName().getURI());
+ System.out.println("Root URI: " + file.getName().getRootURI());
+ System.out.println("Parent: " + file.getName().getParent());
+ System.out.println("Type: " + file.getType());
+ System.out.println("Exists: " + file.exists());
+ System.out.println("Readable: " + file.isReadable());
+ System.out.println("Writeable: " + file.isWriteable());
+ System.out.println("Root path: " + file.getFileSystem().getRoot().getName().getPath());
+ if (file.exists())
+ {
+ if (file.getType().equals(FileType.FILE))
+ {
+ System.out.println("Size: " + file.getContent().getSize() + " bytes");
+ }
+ else if (file.getType().equals(FileType.FOLDER) && file.isReadable())
+ {
+ FileObject[] children = file.getChildren();
+ System.out.println("Directory with " + children.length + " files");
+ for (int iterChildren = 0; iterChildren < children.length; iterChildren++)
+ {
+ System.out.println("#" + iterChildren + ": " + children[iterChildren].getName());
+ if (iterChildren > 5)
+ {
+ break;
+ }
+ }
+ }
+ System.out.println("Last modified: " + DateFormat.getInstance().format(new Date(file.getContent().getLastModifiedTime())));
+ }
+ else
+ {
+ System.out.println("The file does not exist");
+ }
+ file.close();
+ }
+ catch (FileSystemException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+}
+
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/package.html
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/package.html?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/package.html (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/example/package.html Thu Sep 23 06:04:21 2010
@@ -0,0 +1,19 @@
+<!--
+ 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.
+-->
+<body>
+<p>Examples classes.</p>
+</body>
\ No newline at end of file
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/FtpCheck.java
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/FtpCheck.java?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/FtpCheck.java (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/FtpCheck.java Thu Sep 23 06:04:21 2010
@@ -0,0 +1,94 @@
+/*
+* 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.
+ */
+package org.apache.commons.vfs.libcheck;
+
+import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPFile;
+import org.apache.commons.net.ftp.FTPReply;
+
+import java.io.OutputStream;
+
+/**
+ * Basic check for sftp
+ */
+public class FtpCheck
+{
+ public static void main(String args[]) throws Exception
+ {
+ if (args.length < 3)
+ {
+ throw new IllegalArgumentException("Usage: FtpCheck user pass host dir");
+ }
+ String user = args[0];
+ String pass = args[1];
+ String host = args[2];
+ String dir = null;
+ if (args.length == 4)
+ {
+ dir = args[3];
+ }
+
+ FTPClient client = new FTPClient();
+ client.connect(host);
+ int reply = client.getReplyCode();
+ if (!FTPReply.isPositiveCompletion(reply))
+ {
+ throw new IllegalArgumentException("cant connect: " + reply);
+ }
+ if (!client.login(user, pass))
+ {
+ throw new IllegalArgumentException("login failed");
+ }
+ client.enterLocalPassiveMode();
+
+ OutputStream os = client.storeFileStream(dir + "/test.txt");
+ if (os == null)
+ {
+ throw new IllegalStateException(client.getReplyString());
+ }
+ os.write("test".getBytes());
+ os.close();
+ client.completePendingCommand();
+
+ if (dir != null)
+ {
+ if (!client.changeWorkingDirectory(dir))
+ {
+ throw new IllegalArgumentException("change dir to '" + dir + "' failed");
+ }
+ }
+
+ System.err.println("System: " + client.getSystemName());
+
+ FTPFile[] files = client.listFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ FTPFile file = files[i];
+ if (file == null)
+ {
+ System.err.println("#" + i + ": " + null);
+ }
+ else
+ {
+ System.err.println("#" + i + ": " + file.getRawListing());
+ System.err.println("#" + i + ": " + file.toString());
+ System.err.println("\t name:" + file.getName() + " type:" + file.getType());
+ }
+ }
+ client.disconnect();
+ }
+}
Added: synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/SftpCheck.java
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/SftpCheck.java?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/SftpCheck.java (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/examples/src/main/java/org/apache/commons/vfs/libcheck/SftpCheck.java Thu Sep 23 06:04:21 2010
@@ -0,0 +1,93 @@
+/*
+* 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.
+ */
+package org.apache.commons.vfs.libcheck;
+
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
+
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Vector;
+
+/**
+ * Basic check for sftp
+ */
+public class SftpCheck
+{
+ public static void main(String args[]) throws Exception
+ {
+ if (args.length != 4)
+ {
+ throw new IllegalArgumentException("Usage: SftpCheck user pass host dir");
+ }
+ String user = args[0];
+ String pass = args[1];
+ String host = args[2];
+ String dir = args[3];
+
+ Properties props = new Properties();
+ props.setProperty("StrictHostKeyChecking", "false");
+ JSch jsch = new JSch();
+ Session session = jsch.getSession(user, host, 22);
+ session.setUserInfo(new UserInfo()
+ {
+ public String getPassphrase()
+ {
+ return null;
+ }
+
+ public String getPassword()
+ {
+ return null;
+ }
+
+ public boolean promptPassword(String string)
+ {
+ return false;
+ }
+
+ public boolean promptPassphrase(String string)
+ {
+ return false;
+ }
+
+ public boolean promptYesNo(String string)
+ {
+ return true;
+ }
+
+ public void showMessage(String string)
+ {
+ }
+ });
+ session.setPassword(pass);
+ session.connect();
+ ChannelSftp chan = (ChannelSftp) session.openChannel("sftp");
+ chan.connect();
+ Vector list = chan.ls(dir);
+ Iterator iterList = list.iterator();
+ while (iterList.hasNext())
+ {
+ System.err.println(iterList.next());
+ }
+ System.err.println("done");
+ chan.disconnect();
+ session.disconnect();
+ }
+}
Added: synapse/branches/commons-vfs-2-synapse-2.0/findbugs-exclude-filter.xml
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/findbugs-exclude-filter.xml?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/findbugs-exclude-filter.xml (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/findbugs-exclude-filter.xml Thu Sep 23 06:04:21 2010
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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.
+-->
+
+<!-- ===================================================================== -->
+<!-- $Id: findbugs-exclude-filter.xml 773234 2009-05-09 15:27:59Z rgoers $ -->
+<!-- ===================================================================== -->
+<FindBugsFilter>
+ <!-- Enable only high priority warnings -->
+ <Match>
+ <Priority value="2"/>
+ </Match>
+
+ <Match>
+ <Priority value="3"/>
+ </Match>
+</FindBugsFilter>
Added: synapse/branches/commons-vfs-2-synapse-2.0/pom.xml
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/pom.xml?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/pom.xml (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/pom.xml Thu Sep 23 06:04:21 2010
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+ -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>15</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-project</artifactId>
+ <name>Commons VFS</name>
+ <description>VFS is a Virtual File System library.</description>
+ <packaging>pom</packaging>
+ <version>2.0-21092010</version>
+
+ <url>http://commons.apache.org/vfs/</url>
+ <inceptionYear>2002</inceptionYear>
+
+ <modules>
+ <module>core</module>
+ <module>examples</module>
+ <module>sandbox</module>
+ </modules>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>https://issues.apache.org/jira/browse/VFS</url>
+ </issueManagement>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/vfs/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/vfs/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/commons/proper/vfs/trunk/</url>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Adam Murdoch</name>
+ <id>adammurdoch</id>
+ <email>adammurdoch -at- apache.org</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>James Strachan</name>
+ <id>jstrachan</id>
+ <email>jstrachan -at- apache.org</email>
+ <organization>SpiritSoft, Inc.</organization>
+ </developer>
+ <developer>
+ <name>Mario Ivankovits</name>
+ <id>imario</id>
+ <email>imario -at- apache.org</email>
+ <organization>OPS EDV Gmbh</organization>
+ </developer>
+ <developer>
+ <name>Rahul Akolkar</name>
+ <id>rahul</id>
+ <email>rahul -at- apache.org</email>
+ <organization>Apache Software Foundation</organization>
+ </developer>
+ <developer>
+ <name>James Carman</name>
+ <id>jcarman</id>
+ <email>jcarman -at- apache.org</email>
+ <organization>Apache Software Foundation</organization>
+ </developer>
+ <developer>
+ <name>Ralph Goers</name>
+ <id>rgoers</id>
+ <email>rgoers -at- apache.org</email>
+ <organization>Intuit</organization>
+ </developer>
+ <developer>
+ <name>Joerg Schaible</name>
+ <id>joehni</id>
+ <email>joehni -at- apache.org</email>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>Rami Ojares</name>
+ <email>rami.ojares -at- elisa.fi</email>
+ </contributor>
+ <contributor>
+ <name>Anthony Goubard</name>
+ <email>adagoubard -at- chello.nl</email>
+ </contributor>
+ <contributor>
+ <name>Christopher Ottley</name>
+ <email>xknight -at- users.sourceforge.net</email>
+ </contributor>
+ </contributors>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <commons.componentid>vfs</commons.componentid>
+ <commons.release.version>1.0</commons.release.version>
+ <commons.binary.suffix></commons.binary.suffix>
+ <commons.jira.id>VFS</commons.jira.id>
+ <commons.jira.pid>12310495</commons.jira.pid>
+ <maven.compile.source>1.4</maven.compile.source>
+ <maven.compile.target>1.4</maven.compile.target>
+ <commons.release.name>commons-vfs-${commons.release.version}</commons.release.name>
+ <vfs.parent.dir>${basedir}</vfs.parent.dir>
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-build-plugin</artifactId>
+ <!-- version inherited from commons-parent -->
+ <configuration>
+ <commons.release.name>commons-${commons.componentid}-${commons.release.version}</commons.release.name>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- version inherited from commons-parent -->
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ <descriptor>src/assembly/src.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <!-- version inherited from commons-parent -->
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>install</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <xmlPath>${basedir}/src/changes/changes.xml</xmlPath>
+ <issueLinkTemplate>%URL%/%ISSUE%</issueLinkTemplate>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> -->
+ <configLocation>${vfs.parent.dir}/checkstyle.xml</configLocation>
+ <suppressionsLocation>${vfs.parent.dir}/checkstyle-suppressions.xml</suppressionsLocation>
+ <enableRulesSummary>false</enableRulesSummary>
+ <propertyExpansion>basedir=${basedir}</propertyExpansion>
+ <propertyExpansion>licensedir=${vfs.parent.dir}/checkstyle-header.txt</propertyExpansion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <threshold>Normal</threshold>
+ <effort>Default</effort>
+ <excludeFilterFile>findbugs-exclude-filter.xml</excludeFilterFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- artifacts of project, versions managed by release-plugin -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-sandbox</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-examples</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- 3rd party dependencies -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-net</groupId>
+ <artifactId>commons-net</artifactId>
+ <version>1.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.0</version>
+ <!-- JCR-683: Exclude bad transitive dependencies, check again when upgrading version -->
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-webdav</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.2</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.0.b2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch</artifactId>
+ <version>0.1.42</version>
+ </dependency>
+ <dependency>
+ <groupId>jcifs</groupId>
+ <artifactId>jcifs</artifactId>
+ <version>0.8.3</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <profiles>
+ <profile>
+ <id>site</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.6</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ <configuration>
+ <stagingDirectory>${user.home}/vfssite/tmp</stagingDirectory>
+ <stagingSiteURL>file://${user.home}/vfssite/staging</stagingSiteURL>
+ <!-- Exclude the navigation file for Maven 1 sites
+ and the changes file used by the changes-plugin,
+ as they interfere with the site generation. -->
+ <moduleExcludes>
+ <xdoc>navigation.xml,changes.xml</xdoc>
+ </moduleExcludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <id>apache.snapshots.https</id>
+ <name>Apache Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>apache.m1</id>
+ <name>Apache Maven 1 Repository</name>
+ <url>http://people.apache.org/repo/m1-snapshot-repository/</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+
+ <distributionManagement>
+ <repository>
+ <id>apache.releases.https</id>
+ <name>Apache Release Distribution Repository</name>
+ <url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
+ </repository>
+ <snapshotRepository>
+ <id>apache.snapshots.https</id>
+ <name>Apache Development Snapshot Repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ </snapshotRepository>
+ <site>
+ <id>apache.website</id>
+ <url>scp://people.apache.org/www/commons.apache.org/vfs/</url>
+ </site>
+ </distributionManagement>
+
+</project>
Added: synapse/branches/commons-vfs-2-synapse-2.0/sandbox/build.xml
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/sandbox/build.xml?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/sandbox/build.xml (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/sandbox/build.xml Thu Sep 23 06:04:21 2010
@@ -0,0 +1,138 @@
+<!--
+ 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.
+ -->
+<project name="commons-vfs-sandbox" default="jar" basedir=".">
+ <property file="${user.home}/.m2/maven.properties"/>
+ <property name="maven.build.output" value="target/classes"/>
+ <property name="maven.build.directory" value="target"/>
+ <property name="maven.build.final.name" value="commons-vfs-sandbox-2.0-SNAPSHOT"/>
+ <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
+ <property name="maven.test.output" value="target/test-classes"/>
+ <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+ <path id="build.classpath">
+ <fileset dir="${maven.repo.local}">
+ <include name="slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar"/>
+ <include name="org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar"/>
+ <include name="commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
+ <include name="javax/activation/activation/1.1/activation-1.1.jar"/>
+ <include name="javax/mail/mail/1.4/mail-1.4.jar"/>
+ <include name="commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar"/>
+ <include name="jcifs/jcifs/0.8.3/jcifs-0.8.3.jar"/>
+ </fileset>
+ </path>
+ <target name="clean" description="Clean the output directory">
+ <delete dir="${maven.build.directory}"/>
+ </target>
+ <target name="compile" depends="get-deps" description="Compile the code">
+ <mkdir dir="${maven.build.output}"/>
+ <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
+ <src>
+ <pathelement location="src/main/java"/>
+ </src>
+ <classpath refid="build.classpath"/>
+ </javac>
+ <mkdir dir="${maven.build.output}/META-INF"/>
+ <copy todir="${maven.build.output}/META-INF">
+ <fileset dir="..">
+ <include name="NOTICE.txt"/>
+ </fileset>
+ </copy>
+ <copy todir="${maven.build.output}">
+ <fileset dir="src/main/resources">
+ <include name="**"/>
+ </fileset>
+ </copy>
+ <copy todir="${maven.build.output}">
+ <fileset dir="..">
+ <include name="LICENSE.txt"/>
+ </fileset>
+ </copy>
+ </target>
+<!--
+ <target name="jar" depends="compile,test" description="Clean the JAR">
+-->
+ <target name="jar" depends="compile" description="Clean the JAR">
+ <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
+ </target>
+ <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
+ <mkdir dir="${maven.test.output}"/>
+ <javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
+ <src>
+ <pathelement location="src/test/java"/>
+ </src>
+ <classpath>
+ <path refid="build.classpath"/>
+ <pathelement location="${maven.build.output}"/>
+ </classpath>
+ </javac>
+ </target>
+ <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
+ <mkdir dir="${maven.test.reports}"/>
+ <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="false"/>
+ <classpath>
+ <path refid="build.classpath"/>
+ <pathelement location="${maven.build.output}"/>
+ <pathelement location="${maven.test.output}"/>
+ </classpath>
+ <batchtest todir="${maven.test.reports}">
+ <fileset dir="src/test/java">
+ <include name="**/*Test.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+ <target name="test-junit-present">
+ <available classname="junit.framework.Test" property="junit.present"/>
+ </target>
+ <target name="junit-present" depends="test-junit-present" unless="junit.present">
+ <echo>================================= WARNING ================================</echo>
+ <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
+ <echo>==========================================================================</echo>
+ </target>
+ <target name="test-offline">
+ <condition property="maven.mode.offline">
+ <equals arg1="${build.sysclasspath}" arg2="only"/>
+ </condition>
+ </target>
+ <target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
+ <mkdir dir="${maven.repo.local}"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" dest="${maven.repo.local}/slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" dest="${maven.repo.local}/slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" dest="${maven.repo.local}/slide/jakarta-slide-webdavlib/20050629.161100/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" dest="${maven.repo.local}/org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" dest="${maven.repo.local}/org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" dest="${maven.repo.local}/org/apache/commons/commons-vfs/2.0-SNAPSHOT/commons-vfs-2.0-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" dest="${maven.repo.local}/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" dest="${maven.repo.local}/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" dest="${maven.repo.local}/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//javax/activation/activation/1.1/activation-1.1.jar" dest="${maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//javax/activation/activation/1.1/activation-1.1.jar" dest="${maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/javax/activation/activation/1.1/activation-1.1.jar" dest="${maven.repo.local}/javax/activation/activation/1.1/activation-1.1.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//javax/mail/mail/1.4/mail-1.4.jar" dest="${maven.repo.local}/javax/mail/mail/1.4/mail-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//javax/mail/mail/1.4/mail-1.4.jar" dest="${maven.repo.local}/javax/mail/mail/1.4/mail-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/javax/mail/mail/1.4/mail-1.4.jar" dest="${maven.repo.local}/javax/mail/mail/1.4/mail-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" dest="${maven.repo.local}/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" dest="${maven.repo.local}/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" dest="${maven.repo.local}/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m2-snapshot-repository//jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" dest="${maven.repo.local}/jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://people.apache.org/repo/m1-snapshot-repository//jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" dest="${maven.repo.local}/jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true"/>
+ <get src="http://repo1.maven.org/maven2/jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" dest="${maven.repo.local}/jcifs/jcifs/0.8.3/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true"/>
+ </target>
+</project>
Added: synapse/branches/commons-vfs-2-synapse-2.0/sandbox/pom.xml
URL: http://svn.apache.org/viewvc/synapse/branches/commons-vfs-2-synapse-2.0/sandbox/pom.xml?rev=1000332&view=auto
==============================================================================
--- synapse/branches/commons-vfs-2-synapse-2.0/sandbox/pom.xml (added)
+++ synapse/branches/commons-vfs-2-synapse-2.0/sandbox/pom.xml Thu Sep 23 06:04:21 2010
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Commons VFS Sandbox</name>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-sandbox</artifactId>
+ <version>2.0-21092010</version>
+ <description>VFS is a Virtual File System library - Sandbox.</description>
+
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs-project</artifactId>
+ <version>2.0-21092010</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jcifs</groupId>
+ <artifactId>jcifs</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs</artifactId>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <commons.componentid>vfs-sandbox</commons.componentid>
+ <vfs.parent.dir>${basedir}/..</vfs.parent.dir>
+ </properties>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>..</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>NOTICE.txt</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>..</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <!-- surfire do not honor suite(), see MSUREFIRE-131 why our tests wont work with maven 2 -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>test.basedir</name>
+ <value>../core/target/test-classes/test-data</value>
+ </property>
+ <property>
+ <name>test.basedir.res</name>
+ <value>test-data</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>smb</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>test.basedir</name>
+ <value>../core/target/test-classes/test-data</value>
+ </property>
+ <property>
+ <name>test.basedir.res</name>
+ <value>test-data</value>
+ </property>
+ <property>
+ <name>test.http.uri</name>
+ <value>${test.smb.uri}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>