Commit Diff


commit - 58bf77d7272e5e064be3984a237e52329db76d3d
commit + 01bb2bb6534378e3dc5268830b33617cc82a1af9
blob - 4ffa13f363bb7e2a984cd5dbd5049b70d07bfd07
blob + 8333fd209f021cf40ec5a8eef14bedef0b57b5ef
--- modules/server/moxo-server.iml
+++ modules/server/moxo-server.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="false" MavenProjectsManager.isMavenModule="true" version="4">
+<module relativePaths="false" MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
     <output url="file://$MODULE_DIR$/target/classes" />
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
@@ -38,153 +38,6 @@
     <Base>
       <setting name="state" value="1" />
     </Base>
-    <LanguageOptions name="HTML">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="JAVA">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="JSP">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="JavaScript">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="Properties">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="XML">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright (c) &amp;#36;today.year, Your Corporation. All Rights Reserved." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="2" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
-    <LanguageOptions name="__TEMPLATE__">
-      <option name="templateOptions">
-        <value>
-          <option name="block" value="true" />
-          <option name="separateBefore" value="false" />
-          <option name="separateAfter" value="false" />
-          <option name="prefixLines" value="true" />
-          <option name="lenBefore" value="80" />
-          <option name="lenAfter" value="80" />
-          <option name="box" value="false" />
-          <option name="filler" value=" " />
-        </value>
-      </option>
-      <option name="notice" value="Copyright &amp;#36;today.year Matthias L. Jugel.&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10;       http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
-      <option name="keyword" value="Copyright" />
-      <option name="fileTypeOverride" value="4" />
-      <option name="relativeBefore" value="true" />
-      <option name="addBlankAfter" value="true" />
-      <option name="fileLocation" value="1" />
-      <option name="useAlternate" value="false" />
-    </LanguageOptions>
   </component>
 </module>
 
blob - 3353936723407d8aaf9b55fb8cc0cec4601cf2e3
blob + 3c4d8498e31763d069efcd07b76df045debaa7ea
--- modules/vfs.s3/src/main/java/com/thinkberg/vfs/s3/jets3t/Jets3tFileObject.java
+++ modules/vfs.s3/src/main/java/com/thinkberg/vfs/s3/jets3t/Jets3tFileObject.java
@@ -32,7 +32,6 @@ import java.io.*;
 import java.nio.channels.Channels;
 import java.nio.channels.FileChannel;
 import java.nio.channels.ReadableByteChannel;
-import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -138,7 +137,6 @@ public class Jets3tFileObject extends AbstractFileObje
 
       try {
         S3Object[] children = service.listObjects(bucket, path, null);
-        LOG.debug(children);
         String targetName = targetObject.getKey();
         for (S3Object child : children) {
           String targetChildName = child.getKey();
@@ -157,8 +155,8 @@ public class Jets3tFileObject extends AbstractFileObje
     }
   }
 
-  @Override
   public void copyFrom(FileObject file, FileSelector selector) throws FileSystemException {
+    // TODO must implement to support attribute copy
     super.copyFrom(file, selector);
   }
 
@@ -210,7 +208,6 @@ public class Jets3tFileObject extends AbstractFileObje
       protected void onClose() throws IOException {
         try {
           LOG.debug(String.format("sending '%s' to storage (cached=%b)", object.getKey(), cacheFile));
-          LOG.debug(object);
           if (cacheFile != null) {
             FileChannel cacheFc = getCacheFile().getChannel();
             object.setContentLength(cacheFc.size());
@@ -246,8 +243,6 @@ public class Jets3tFileObject extends AbstractFileObje
 
     try {
       S3Object[] children = service.listObjects(bucket, path, "/");
-      LOG.debug(Arrays.asList(children));
-      LOG.debug(Arrays.asList(children));
       String[] childrenNames = new String[children.length];
       for (int i = 0; i < children.length; i++) {
         if (!children[i].getKey().equals(path)) {
blob - 9e5648fcc4e4e7515289b475da7bb2992a230de9
blob + b07f417933f974d1f06704b99bc8a362674ff290
--- modules/vfs.s3/src/test/java/com/thinkberg/vfs/s3/tests/S3FileProviderTest.java
+++ modules/vfs.s3/src/test/java/com/thinkberg/vfs/s3/tests/S3FileProviderTest.java
@@ -25,6 +25,7 @@ import org.apache.commons.vfs.*;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Arrays;
 
 /**
  * @author Matthias L. Jugel
@@ -187,12 +188,14 @@ public class S3FileProviderTest extends S3TestCase {
 
   public void testCopyShallowFolder() throws FileSystemException {
     FileObject origFolder = ROOT.resolveFile(FOLDER);
+    origFolder.delete(ALL_FILE_SELECTOR);
     origFolder.createFolder();
 
     origFolder.resolveFile("file.0").createFile();
     origFolder.resolveFile("file.1").createFile();
     origFolder.resolveFile("file.2").createFile();
 
+    System.out.println(Arrays.asList(origFolder.getChildren()));
     assertEquals(3, origFolder.getChildren().length);
 
     FileObject destFolder = ROOT.resolveFile(FOLDER + "_dest");
blob - 8f0bdb3b66beb18d36e1200ac5a043a0182ada4f
blob + 44dc1103f997eade1031459d572a5d4516585705
--- modules/webdav/src/test/java/com/thinkberg/webdav/DavTestCase.java
+++ modules/webdav/src/test/java/com/thinkberg/webdav/DavTestCase.java
@@ -43,7 +43,7 @@ public class DavTestCase extends TestCase {
   }
 
   protected void testPropertyNoValue(FileObject object, String propertyName) throws FileSystemException {
-    Element root = serializeDavResource(object, propertyName, true);
+    Element root = serializeDavResource(object, propertyName);
     assertEquals(EMPTY, selectExistingPropertyValue(root, propertyName));
   }
 
@@ -64,10 +64,6 @@ public class DavTestCase extends TestCase {
   }
 
   protected Element serializeDavResource(FileObject object, String propertyName) throws FileSystemException {
-    return serializeDavResource(object, propertyName, false);
-  }
-
-  protected Element serializeDavResource(FileObject object, String propertyName, boolean ignoreValues) throws FileSystemException {
     Element root = DocumentHelper.createElement("root");
     DavResourceFactory factory = DavResourceFactory.getInstance();
     DavResource davResource = factory.getDavResource(object);
blob - 3a0fa1b9ecede2c113b5c0fca9111d6041b9e615
blob + 9d67e71becdda2f638cdd748a632e533a42b9b91
--- pom.xml
+++ pom.xml
@@ -9,107 +9,7 @@
     <modules>
         <module>modules/webdav</module>
         <module>modules/vfs.s3</module>
+        <module>modules/server</module>
     </modules>
     <url>http://thinkberg.com</url>
-    <dependencies>
-        <dependency>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>jetty</artifactId>
-            <version>6.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.thinkberg</groupId>
-            <artifactId>webdav</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.thinkberg</groupId>
-            <artifactId>vfs.s3</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <verbose>true</verbose>
-                    <fork>true</fork>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-
-            <!--
-              mvn test
-              Documentation: http://maven.apache.org/plugins/maven-surefire-plugin/
-            -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <includes>
-                        <include>**/MoxoTest.java</include>
-                    </includes>
-                </configuration>
-            </plugin>
-
-            <!--
-               jar
-               mvn package
-               Documentation: http://maven.apache.org/plugins/maven-jar-plugin/
-             -->
-            <!--<plugin>-->
-            <!--<groupId>org.apache.maven.plugins</groupId>-->
-            <!--<artifactId>maven-jar-plugin</artifactId>-->
-            <!--<executions>-->
-            <!--<execution>-->
-            <!--<phase>package</phase>-->
-            <!--<goals>-->
-            <!--<goal>jar</goal>-->
-            <!--</goals>-->
-            <!--<configuration>-->
-            <!--<classifier>client</classifier>-->
-            <!--<includes>-->
-            <!--<include>**/client/*</include>-->
-            <!--<include>**/servlet/*</include>-->
-            <!--<include>barcode-client.properties</include>-->
-            <!--<include>log4j.properties</include>-->
-            <!--<include>images/*</include>-->
-            <!--<include>templates/*</include>-->
-            <!--</includes>-->
-            <!--</configuration>-->
-            <!--</execution>-->
-            <!--</executions>-->
-            <!--</plugin>-->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                    <mainClass>com.thinkberg.moxo.Main</mainClass>
-                                    <addClasspath>true</addClasspath>
-                                </manifest>
-                            </archive>
-                            <includes>
-                                <include>**/moxo/*</include>
-                            </includes>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
 </project>