Index: core/pom.xml
===================================================================
--- core/pom.xml	(revision 13652)
+++ core/pom.xml	(working copy)
@@ -70,5 +70,6 @@
     <module>xwiki-rendering</module>
     <module>xwiki-configuration</module>
     <module>xwiki-query</module>
+    <module>xwiki-webdav</module>
   </modules>
 </project>
Index: core/xwiki-webdav/src/test/resources/META-INF/plexus/components.xml
===================================================================
--- core/xwiki-webdav/src/test/resources/META-INF/plexus/components.xml	(revision 0)
+++ core/xwiki-webdav/src/test/resources/META-INF/plexus/components.xml	(revision 0)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<component-set>
+  <components>
+  
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>root</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.RootView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>
+
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>home-baseview</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.HomeView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>
+
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>orphans-baseview</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.OrphansView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>
+
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>whatsnew-baseview</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.WhatsnewView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>
+
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>attachments-baseview</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.attachments.AttachmentsView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>
+
+    <component>
+      <role>com.xpn.xwiki.plugin.webdav.resources.XWikiDavResource</role>
+      <role-hint>pages-baseview</role-hint>
+      <implementation>com.xpn.xwiki.plugin.webdav.resources.views.pages.PagesView</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>	
+
+  </components>
+</component-set>
Index: core/xwiki-webdav/src/test/resources/WEB-INF/plexus.xml
===================================================================
--- core/xwiki-webdav/src/test/resources/WEB-INF/plexus.xml	(revision 0)
+++ core/xwiki-webdav/src/test/resources/WEB-INF/plexus.xml	(revision 0)
@@ -0,0 +1,73 @@
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+<plexus>
+
+  <!-- Configure Plexus to use XWiki's lifecycle and XWiki's own phases -->
+  <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
+    <lifecycle-handlers>
+      <lifecycle-handler implementation="org.xwiki.plexus.lifecycle.XWikiLifecycleHandler">
+        <id>xwiki</id>
+        <name>XWiki Lifecycle Handler</name>
+        <begin-segment>
+          <!-- Let Plexus do the component injection -->
+          <phase implementation="org.xwiki.plexus.lifecycle.phase.LogEnablePhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.AutoConfigurePhase"/>
+          <!-- See the comment below to understand why this is commented out -->
+          <!--phase implementation="org.codehaus.plexus.registry.RegistryConfigurePhase"/-->
+          <phase implementation="org.xwiki.plexus.lifecycle.phase.ComposePhase"/>
+          <phase implementation="org.xwiki.plexus.lifecycle.phase.InitializePhase"/>
+        </begin-segment>
+        <suspend-segment/>
+        <resume-segment/>
+        <end-segment/>
+      </lifecycle-handler>
+    </lifecycle-handlers>
+    <default-lifecycle-handler-id>xwiki</default-lifecycle-handler-id>
+  </lifecycle-handler-manager>
+
+  <components>
+    <!-- The registry component allows using Jakarta Commons Configuration to store configuration
+         data for XWiki components, in addition to using components.xml files. This allows storing
+         configurations files in various formats (properties file, xml files, in a database, etc).
+         See Jakarta Commons Configuration for all options.
+    -->
+    <!-- Note: We're not using it yet. We need to ensure it works fine before we do so. We
+         haven't tested it yet. We also need to decide if we need to implement our own solution.
+         For example the current Registry implementation will not let component access to general
+         configuration data, only those configured for the component in question.
+    <component>
+      <role>org.codehaus.plexus.registry.Registry</role>
+      <implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation>
+      <role-hint>commons-configuration</role-hint>
+      <configuration>
+        <properties>
+          Q: How can we put this file in WEB-INF/
+          <properties fileName="xwiki.properties" config-at="org.xwiki"/>
+        </properties>
+      </configuration>
+     </component-->
+  </components>
+
+</plexus>
+
+
Index: core/xwiki-webdav/src/test/resources/WEB-INF/plexus.properties
===================================================================
--- core/xwiki-webdav/src/test/resources/WEB-INF/plexus.properties	(revision 0)
+++ core/xwiki-webdav/src/test/resources/WEB-INF/plexus.properties	(revision 0)
@@ -0,0 +1,4 @@
+# Plexus configuration file. It's required by some part of Plexus
+# that we don't use. It's a bug that Plexus makes it mandatory.
+# In the future, remove it once Plexus doesn't give a warning
+# when this file isn't present.
Index: core/xwiki-webdav/src/test/resources/WEB-INF/web.xml
===================================================================
--- core/xwiki-webdav/src/test/resources/WEB-INF/web.xml	(revision 0)
+++ core/xwiki-webdav/src/test/resources/WEB-INF/web.xml	(revision 0)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+<web-app id="WebApp_ID" version="2.4"
+	xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+	<display-name>xwiki-webdav-servlet</display-name>
+	<!--
+		Initializes Plexus and puts a reference to the Plexus Component
+		Manager in the Servlet Context. Also initializes the Container Manager
+		component with the Servlet Context.
+	-->
+	<listener>
+		<listener-class>org.xwiki.container.servlet.XWikiPlexusServletContextListener</listener-class>
+	</listener>
+	<servlet>
+		<servlet-name>webdav</servlet-name>
+		<servlet-class>com.xpn.xwiki.plugin.webdav.DavServlet</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>webdav</servlet-name>
+		<url-pattern>/</url-pattern>
+	</servlet-mapping>
+</web-app>
\ No newline at end of file
Index: core/xwiki-webdav/src/test/resources/WEB-INF/hibernate.cfg.xml
===================================================================
--- core/xwiki-webdav/src/test/resources/WEB-INF/hibernate.cfg.xml	(revision 0)
+++ core/xwiki-webdav/src/test/resources/WEB-INF/hibernate.cfg.xml	(revision 0)
@@ -0,0 +1,141 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
+                                         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<!-- Template for hibernate configuration. processing by maven using profiles.
+     Replace original src/main/webapp/WEB-INF/hibernate.cfg.xml -->
+<hibernate-configuration>
+  <session-factory>
+
+    <property name="show_sql">false</property>
+    <property name="use_outer_join">true</property>
+
+    <property name="dbcp.defaultAutoCommit">false</property>
+    <property name="dbcp.maxActive">50</property>
+    <property name="dbcp.maxIdle">5</property>
+    <property name="dbcp.maxWait">30000</property>
+    <property name="dbcp.whenExhaustedAction">1</property>
+    <property name="dbcp.ps.whenExhaustedAction">1</property>
+    <property name="dbcp.ps.maxActive">20</property>
+    <property name="dbcp.ps.maxWait">120000</property>
+    <property name="dbcp.ps.maxIdle">20</property>
+
+    <!-- Please refer to the installation guide on
+         http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
+         database. You'll need to do 2 things:
+         1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
+         2) Uncomment the properties below for your specific DB
+    -->
+
+    <!--             <property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
+    <property name="connection.username">sa</property>
+    <property name="connection.password"></property>
+    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+    <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
+
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    
+    <mapping resource="xwiki.hbm.xml"/>
+    <mapping resource="feeds.hbm.xml"/> -->
+                
+    <!-- MySQL configuration.
+         Uncomment if you want to use MySQL and comment out other database configurations.
+         Note that the database will be created automatically if it doesn't already exist.
+         We need to set the sql_mode to a less strict value, see XWIKI-1945
+    <property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&amp;sessionVariables=sql_mode=''</property>
+    <property name="connection.username">xwiki</property>
+    <property name="connection.password">xwiki</property>
+    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
+    <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    <mapping resource="xwiki.hbm.xml"/>
+    <mapping resource="feeds.hbm.xml"/>-->
+
+    <!-- HSQLDB configuration.
+         Uncomment if you want to use HSQLDB and comment out other database configurations.
+         Note that the database will be created automatically if it doesn't already exist.-->
+    <property name="connection.url">jdbc:hsqldb:file:${basedir}/database/xwiki_db;shutdown=true</property>
+    <property name="connection.username">sa</property>
+    <property name="connection.password"></property>
+    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+    <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    <mapping resource="xwiki.hbm.xml"/>
+    <mapping resource="feeds.hbm.xml"/>
+            
+
+    <!-- PostgreSQL configuration.
+         Uncomment if you want to use PostgreSQL and comment out other database configurations.
+         Note that the database will be created automatically if it doesn't already exist.
+    <property name="connection.url">jdbc:postgresql:xwiki</property>
+    <property name="connection.username">xwiki</property>
+    <property name="connection.password">xwiki</property>
+    <property name="connection.driver_class">org.postgresql.Driver</property>
+    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    <mapping resource="xwiki.hbm.xml"/>
+    <mapping resource="feeds.hbm.xml"/>
+            -->
+
+    <!-- Oracle configuration.
+         Uncomment if you want to use Oracle and comment out other database configurations.
+         Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and
+         "hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than
+         32K. 
+    <property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
+    <property name="connection.username">xwiki</property>
+    <property name="connection.password">xwiki</property>
+    <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
+    <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    <property name="hibernate.connection.SetBigStringTryClob">true</property>
+    <property name="hibernate.jdbc.batch_size">0</property>
+    <mapping resource="xwiki.oracle.hbm.xml"/>
+    <mapping resource="feeds.oracle.hbm.xml"/>
+            -->
+
+    <!-- Derby configuration.
+         Uncomment if you want to use Derby and comment out other database configurations.
+         Note that the database will be created automatically if it doesn't already exist.
+    <property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
+    <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
+    <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
+    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
+    <property name="connection.pool_size">2</property>
+    <property name="statement_cache.size">2</property>
+    <mapping resource="xwiki.derby.hbm.xml"/>
+    <mapping resource="feeds.hbm.xml"/>
+            -->
+
+  </session-factory>
+</hibernate-configuration>
Index: core/xwiki-webdav/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- core/xwiki-webdav/src/main/webapp/META-INF/MANIFEST.MF	(revision 13652)
+++ core/xwiki-webdav/src/main/webapp/META-INF/MANIFEST.MF	(working copy)
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-
Index: core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.xml
===================================================================
--- core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.xml	(revision 13652)
+++ core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.xml	(working copy)
@@ -1,73 +0,0 @@
-<!--
- *
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
--->
-<plexus>
-
-  <!-- Configure Plexus to use XWiki's lifecycle and XWiki's own phases -->
-  <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
-    <lifecycle-handlers>
-      <lifecycle-handler implementation="org.xwiki.plexus.lifecycle.XWikiLifecycleHandler">
-        <id>xwiki</id>
-        <name>XWiki Lifecycle Handler</name>
-        <begin-segment>
-          <!-- Let Plexus do the component injection -->
-          <phase implementation="org.xwiki.plexus.lifecycle.phase.LogEnablePhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.AutoConfigurePhase"/>
-          <!-- See the comment below to understand why this is commented out -->
-          <!--phase implementation="org.codehaus.plexus.registry.RegistryConfigurePhase"/-->
-          <phase implementation="org.xwiki.plexus.lifecycle.phase.ComposePhase"/>
-          <phase implementation="org.xwiki.plexus.lifecycle.phase.InitializePhase"/>
-        </begin-segment>
-        <suspend-segment/>
-        <resume-segment/>
-        <end-segment/>
-      </lifecycle-handler>
-    </lifecycle-handlers>
-    <default-lifecycle-handler-id>xwiki</default-lifecycle-handler-id>
-  </lifecycle-handler-manager>
-
-  <components>
-    <!-- The registry component allows using Jakarta Commons Configuration to store configuration
-         data for XWiki components, in addition to using components.xml files. This allows storing
-         configurations files in various formats (properties file, xml files, in a database, etc).
-         See Jakarta Commons Configuration for all options.
-    -->
-    <!-- Note: We're not using it yet. We need to ensure it works fine before we do so. We
-         haven't tested it yet. We also need to decide if we need to implement our own solution.
-         For example the current Registry implementation will not let component access to general
-         configuration data, only those configured for the component in question.
-    <component>
-      <role>org.codehaus.plexus.registry.Registry</role>
-      <implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation>
-      <role-hint>commons-configuration</role-hint>
-      <configuration>
-        <properties>
-          Q: How can we put this file in WEB-INF/
-          <properties fileName="xwiki.properties" config-at="org.xwiki"/>
-        </properties>
-      </configuration>
-     </component-->
-  </components>
-
-</plexus>
-
-
Index: core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.properties
===================================================================
--- core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.properties	(revision 13652)
+++ core/xwiki-webdav/src/main/webapp/WEB-INF/plexus.properties	(working copy)
@@ -1,4 +0,0 @@
-# Plexus configuration file. It's required by some part of Plexus
-# that we don't use. It's a bug that Plexus makes it mandatory.
-# In the future, remove it once Plexus doesn't give a warning
-# when this file isn't present.
Index: core/xwiki-webdav/src/main/webapp/WEB-INF/web.xml
===================================================================
--- core/xwiki-webdav/src/main/webapp/WEB-INF/web.xml	(revision 13652)
+++ core/xwiki-webdav/src/main/webapp/WEB-INF/web.xml	(working copy)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- *
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
--->
-<web-app id="WebApp_ID" version="2.4"
-	xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-	<display-name>xwiki-webdav-servlet</display-name>
-	<!--
-		Initializes Plexus and puts a reference to the Plexus Component
-		Manager in the Servlet Context. Also initializes the Container Manager
-		component with the Servlet Context.
-	-->
-	<listener>
-		<listener-class>org.xwiki.container.servlet.XWikiPlexusServletContextListener</listener-class>
-	</listener>
-	<servlet>
-		<servlet-name>webdav</servlet-name>
-		<servlet-class>com.xpn.xwiki.plugin.webdav.DavServlet</servlet-class>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>webdav</servlet-name>
-		<url-pattern>/</url-pattern>
-	</servlet-mapping>
-</web-app>
\ No newline at end of file
Index: core/xwiki-webdav/src/main/webapp/WEB-INF/hibernate.cfg.xml
===================================================================
--- core/xwiki-webdav/src/main/webapp/WEB-INF/hibernate.cfg.xml	(revision 13652)
+++ core/xwiki-webdav/src/main/webapp/WEB-INF/hibernate.cfg.xml	(working copy)
@@ -1,141 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
- *
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
--->
-<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
-                                         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-<!-- Template for hibernate configuration. processing by maven using profiles.
-     Replace original src/main/webapp/WEB-INF/hibernate.cfg.xml -->
-<hibernate-configuration>
-  <session-factory>
-
-    <property name="show_sql">false</property>
-    <property name="use_outer_join">true</property>
-
-    <property name="dbcp.defaultAutoCommit">false</property>
-    <property name="dbcp.maxActive">50</property>
-    <property name="dbcp.maxIdle">5</property>
-    <property name="dbcp.maxWait">30000</property>
-    <property name="dbcp.whenExhaustedAction">1</property>
-    <property name="dbcp.ps.whenExhaustedAction">1</property>
-    <property name="dbcp.ps.maxActive">20</property>
-    <property name="dbcp.ps.maxWait">120000</property>
-    <property name="dbcp.ps.maxIdle">20</property>
-
-    <!-- Please refer to the installation guide on
-         http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
-         database. You'll need to do 2 things:
-         1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
-         2) Uncomment the properties below for your specific DB
-    -->
-
-    <!--             <property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
-    <property name="connection.username">sa</property>
-    <property name="connection.password"></property>
-    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
-    <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
-
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    
-    <mapping resource="xwiki.hbm.xml"/>
-    <mapping resource="feeds.hbm.xml"/> -->
-                
-    <!-- MySQL configuration.
-         Uncomment if you want to use MySQL and comment out other database configurations.
-         Note that the database will be created automatically if it doesn't already exist.
-         We need to set the sql_mode to a less strict value, see XWIKI-1945
-    <property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&amp;sessionVariables=sql_mode=''</property>
-    <property name="connection.username">xwiki</property>
-    <property name="connection.password">xwiki</property>
-    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
-    <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    <mapping resource="xwiki.hbm.xml"/>
-    <mapping resource="feeds.hbm.xml"/>-->
-
-    <!-- HSQLDB configuration.
-         Uncomment if you want to use HSQLDB and comment out other database configurations.
-         Note that the database will be created automatically if it doesn't already exist.-->
-    <property name="connection.url">jdbc:hsqldb:file:database/xwiki_db;shutdown=true</property>
-    <property name="connection.username">sa</property>
-    <property name="connection.password"></property>
-    <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
-    <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    <mapping resource="xwiki.hbm.xml"/>
-    <mapping resource="feeds.hbm.xml"/>
-            
-
-    <!-- PostgreSQL configuration.
-         Uncomment if you want to use PostgreSQL and comment out other database configurations.
-         Note that the database will be created automatically if it doesn't already exist.
-    <property name="connection.url">jdbc:postgresql:xwiki</property>
-    <property name="connection.username">xwiki</property>
-    <property name="connection.password">xwiki</property>
-    <property name="connection.driver_class">org.postgresql.Driver</property>
-    <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    <mapping resource="xwiki.hbm.xml"/>
-    <mapping resource="feeds.hbm.xml"/>
-            -->
-
-    <!-- Oracle configuration.
-         Uncomment if you want to use Oracle and comment out other database configurations.
-         Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and
-         "hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than
-         32K. 
-    <property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
-    <property name="connection.username">xwiki</property>
-    <property name="connection.password">xwiki</property>
-    <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
-    <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    <property name="hibernate.connection.SetBigStringTryClob">true</property>
-    <property name="hibernate.jdbc.batch_size">0</property>
-    <mapping resource="xwiki.oracle.hbm.xml"/>
-    <mapping resource="feeds.oracle.hbm.xml"/>
-            -->
-
-    <!-- Derby configuration.
-         Uncomment if you want to use Derby and comment out other database configurations.
-         Note that the database will be created automatically if it doesn't already exist.
-    <property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
-    <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
-    <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
-    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-    <property name="connection.pool_size">2</property>
-    <property name="statement_cache.size">2</property>
-    <mapping resource="xwiki.derby.hbm.xml"/>
-    <mapping resource="feeds.hbm.xml"/>
-            -->
-
-  </session-factory>
-</hibernate-configuration>
Index: core/xwiki-webdav/pom.xml
===================================================================
--- core/xwiki-webdav/pom.xml	(revision 13652)
+++ core/xwiki-webdav/pom.xml	(working copy)
@@ -1,33 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- *
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<!--
+		* * See the NOTICE file distributed with this work for additional *
+		information regarding copyright ownership. * * This is free software;
+		you can redistribute it and/or modify it * under the terms of the GNU
+		Lesser General Public License as * published by the Free Software
+		Foundation; either version 2.1 of * the License, or (at your option)
+		any later version. * * This software is distributed in the hope that
+		it will be useful, * but WITHOUT ANY WARRANTY; without even the
+		implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR
+		PURPOSE. See the GNU * Lesser General Public License for more details.
+		* * You should have received a copy of the GNU Lesser General Public *
+		License along with this software; if not, write to the Free * Software
+		Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301
+		USA, or see the FSF site: http://www.fsf.org. *
+	-->
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.xpn.xwiki.platform</groupId>
+	<parent>
+		<groupId>com.xpn.xwiki.platform</groupId>
+		<artifactId>xwiki-core-parent</artifactId>
+		<version>1.7-SNAPSHOT</version>
+	</parent>
 	<artifactId>xwiki-webdav</artifactId>
 	<packaging>jar</packaging>
-	<name>xwiki-webdav</name>
+	<name>XWiki Platform - Core - WebDAV</name>
 	<version>0.0.1-SNAPSHOT</version>
-	<description/>
+	<description>XWiki Platform - Core - WebDAV</description>
 	<build>
 		<plugins>
 			<plugin>
@@ -65,12 +65,13 @@
 			<plugin>
 				<groupId>org.mortbay.jetty</groupId>
 				<artifactId>jetty-maven-plugin</artifactId>
-				<version>7.0.0pre1</version>
+				<version>7.0.0pre3</version>
 				<configuration>
+					<webAppSourceDirectory>${basedir}/target/test-classes</webAppSourceDirectory>
 					<contextPath>/xwiki</contextPath>
-					<scanIntervalSeconds>0</scanIntervalSeconds>
-					<stopKey>stop</stopKey>
-					<stopPort>9999</stopPort>
+					<scanIntervalSeconds>10</scanIntervalSeconds>
+					<stopKey>foo</stopKey>
+					<stopPort>9966</stopPort>
 				</configuration>
 				<executions>
 					<execution>
@@ -84,22 +85,29 @@
 							<daemon>true</daemon>
 						</configuration>
 					</execution>
-					<execution>
-						<id>stop-jetty</id>
-						<phase>post-integration-test</phase>
-						<goals>
-							<goal>stop</goal>
-						</goals>
-					</execution>
+					<!--
+						Following phase had to be removed, otherwise it will terminate the
+						whole build
+					-->
+					<!--
+						<execution> <id>stop-jetty</id>
+						<phase>post-integration-test</phase> <goals> <goal>stop</goal>
+						</goals> </execution>
+					-->
 				</executions>
 			</plugin>
 		</plugins>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+				<filtering>true</filtering>
+			</testResource>
+		</testResources>
 	</build>
 	<dependencies>
 		<dependency>
-			<groupId>tomcat</groupId>
+			<groupId>javax.servlet</groupId>
 			<artifactId>servlet-api</artifactId>
-			<version>5.0.18</version>
 		</dependency>
 		<dependency>
 			<groupId>commons-codec</groupId>
@@ -157,12 +165,12 @@
 			<groupId>javax.jcr</groupId>
 			<artifactId>jcr</artifactId>
 			<version>1.0</version>
-		</dependency>		
+		</dependency>
 		<dependency>
 			<groupId>hsqldb</groupId>
 			<artifactId>hsqldb</artifactId>
 			<version>1.8.0.7</version>
-		</dependency>		
+		</dependency>
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
@@ -182,6 +190,6 @@
 			<groupId>org.xwiki.platform</groupId>
 			<artifactId>xwiki-core-plexus</artifactId>
 			<version>1.6-SNAPSHOT</version>
-		</dependency>	 
-  </dependencies>
+		</dependency>
+	</dependencies>
 </project>
\ No newline at end of file
Index: tools/foxwiki/distribution/pom.xml
===================================================================
--- tools/foxwiki/distribution/pom.xml	(revision 13652)
+++ tools/foxwiki/distribution/pom.xml	(working copy)
@@ -33,7 +33,7 @@
   </parent>
   <artifactId>foxwiki-distribution</artifactId>
   <packaging>pom</packaging>
-  <name>FoXWiki - Distribution</name>
+  <name>XWiki Platform - Tools - FoXWiki - Distribution</name>
   <description>The packaging of the extension</description>
   <dependencies>
     <dependency>
Index: tools/foxwiki/core/pom.xml
===================================================================
--- tools/foxwiki/core/pom.xml	(revision 13652)
+++ tools/foxwiki/core/pom.xml	(working copy)
@@ -33,6 +33,6 @@
   </parent>
   <artifactId>foxwiki-core</artifactId>
   <packaging>jar</packaging>
-  <name>FoXWiki - Core</name>
+  <name>XWiki Platform - Tools - FoXWiki - Core</name>
   <description>The actual "code" files of the extension</description>
 </project>
Index: tools/foxwiki/pom.xml
===================================================================
--- tools/foxwiki/pom.xml	(revision 13652)
+++ tools/foxwiki/pom.xml	(working copy)
@@ -34,7 +34,7 @@
   <artifactId>foxwiki</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>pom</packaging>
-  <name>FoXWiki - Parent</name>
+  <name>XWiki Platform - Tools - FoXWiki - Parent</name>
   <description>FoXWiki, a Firefox extension for XWiki.</description>
   <modules>
     <module>core</module>
Index: tools/xwiki-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java
===================================================================
--- tools/xwiki-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java	(revision 13652)
+++ tools/xwiki-rootwebapp/src/main/java/com/xpn/xwiki/XWikiRootServlet.java	(working copy)
@@ -7,26 +7,44 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+/**
+ * The root servlet for xwiki. The purpose of this servlet is to respond to webdav requests
+ * correctly and to redirect get requests on server root appropriately.
+ * 
+ * @version $Id$
+ */
 public class XWikiRootServlet extends HttpServlet
 {
-    private static final long serialVersionUID = -4907199005755391420L;    
+    /**
+     * Class version.
+     */
+    private static final long serialVersionUID = -4907199005755391420L;
 
+    /**
+     * {@inheritDoc}
+     * <p>Responds to an OPTIONS requests on / with appropriate headers.</p>
+     */
     protected void doOptions(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
-    {        
+    {
         response.setStatus(HttpServletResponse.SC_OK);
         response.setHeader("MS-Author-Via", "DAV");
         response.setHeader("Content-Language", "en");
         response.setHeader("DAV", "1,2");
         response.setHeader("Allow", "OPTIONS, GET, HEAD, PROPFIND, LOCK, UNLOCK");
         response.setHeader("Content-Length", "0");
-        response.flushBuffer();                
+        response.flushBuffer();
     }
 
+    /**
+     * {@inheritDoc}
+     * 
+     * <p>Redirects GET requests on / to /xwiki/.</p>
+     */
     protected void doGet(HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
-    {        
+    {
         resp.sendRedirect("/xwiki/");
     }
-        
+
 }
Index: plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavApi.java
===================================================================
--- plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavApi.java	(revision 13652)
+++ plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavApi.java	(working copy)
@@ -26,16 +26,35 @@
 import com.xpn.xwiki.api.Document;
 import com.xpn.xwiki.plugin.webdav.utils.XWikiDavUtils;
 
+/**
+ * The Api class for the webdav service.
+ *
+ * @version $Id$ 
+ */
 public class XWikiDavApi extends Api
 {
+    /**
+     * Plugin instance.
+     */
     private XWikiDavPlugin plugin;
 
+    /**
+     * Default constructor.
+     * 
+     * @param plugin The plugin instance.
+     * @param context The XWiki context.
+     */
     public XWikiDavApi(XWikiDavPlugin plugin, XWikiContext context)
     {
-        super(context);		
+        super(context);
         this.plugin = plugin;
     }
 
+    /**
+     * @param doc The document which is having the attachment.
+     * @param attachment The attachment itself.
+     * @return The webdav url corresponding to the attachment.
+     */
     public String getDavURL(Document doc, Attachment attachment)
     {
         return XWikiDavUtils.getDavURL(doc, attachment);
Index: plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavPlugin.java
===================================================================
--- plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavPlugin.java	(revision 13652)
+++ plugins/webdav/src/main/java/com/xpn/xwiki/plugin/webdav/XWikiDavPlugin.java	(working copy)
@@ -25,19 +25,37 @@
 import com.xpn.xwiki.plugin.XWikiDefaultPlugin;
 import com.xpn.xwiki.plugin.XWikiPluginInterface;
 
+/**
+ * The plugin class which provides webdav services to wiki pages.
+ * 
+ * @version $Id$
+ */
 public class XWikiDavPlugin extends XWikiDefaultPlugin
 {
+    /**
+     * The default constructor.
+     * 
+     * @param name name of the plugin.
+     * @param className Class name.
+     * @param context XWiki Context.
+     */
     public XWikiDavPlugin(String name, String className, XWikiContext context)
     {
         super(name, className, context);
         init(context);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getName()
     {
         return "webdav";
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
     {
         return new XWikiDavApi((XWikiDavPlugin) plugin, context);
Index: plugins/webdav/pom.xml
===================================================================
--- plugins/webdav/pom.xml	(revision 13652)
+++ plugins/webdav/pom.xml	(working copy)
@@ -31,7 +31,7 @@
     <version>11-SNAPSHOT</version>
   </parent>
   <artifactId>xwiki-plugin-webdav</artifactId>
-  <name>XWiki Platform - Plugins - WebDAV plugin</name>
+  <name>XWiki Platform - Plugins - WebDAV</name>
   <version>0.0.1-SNAPSHOT</version>
   <dependencies>
     <dependency>
