Index: enterprise/trunk/distribution/derby/src/assemble/application.xml
===================================================================
--- enterprise/trunk/distribution/derby/src/assemble/application.xml	(revision 13795)
+++ enterprise/trunk/distribution/derby/src/assemble/application.xml	(working copy)
@@ -26,12 +26,25 @@
   </formats>
   <includeBaseDirectory>true</includeBaseDirectory>
   <dependencySets>
+    <!-- The root web application -->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
            not specified -->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
+        <include>com.xpn.xwiki.platform.tools:xwiki-rootwebapp</include>
+      </includes>
+      <outputDirectory>webapps/root</outputDirectory>
+      <unpack>true</unpack>
+    </dependencySet>
+    <dependencySet>
+      <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
+           plugin where the artifact name will be used instead of / if outputFileNameMapping is
+           not specified
+-->
+      <outputFileNameMapping></outputFileNameMapping>
+      <includes>
         <include>com.xpn.xwiki.products:xwiki-enterprise-web</include>
       </includes>
       <outputDirectory>webapps/xwiki</outputDirectory>
@@ -45,11 +58,13 @@
     <!-- Copy sh+bat files so that 1) we put all non shell files into a jetty/ dir to have all
          Jetty resources in one place and 2) in order to set the execute permissions for the sh
          files (This is also required since the Assembly plugin looses file permissions.
-         See http://jira.codehaus.org/browse/MASSEMBLY-238). -->
+         See http://jira.codehaus.org/browse/MASSEMBLY-238).
+-->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
-           not specified -->
+           not specified
+-->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
         <include>com.xpn.xwiki.platform.tools:xwiki-jetty-resources</include>
@@ -64,11 +79,13 @@
       </unpackOptions>
       <fileMode>755</fileMode>
     </dependencySet>
-    <!-- Copy all other files (excluding sh/bat files). See above for details. -->
+    <!-- Copy all other files (excluding sh/bat files). See above for details.
+-->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
-           not specified -->
+           not specified
+-->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
         <include>com.xpn.xwiki.platform.tools:xwiki-jetty-resources</include>
@@ -92,7 +109,8 @@
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
-           not specified -->
+           not specified
+-->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
         <include>com.xpn.xwiki.products:xwiki-enterprise-database-${xwiki.db}</include>
Index: enterprise/trunk/distribution/mysql/src/assemble/application-no-database.xml
===================================================================
--- enterprise/trunk/distribution/mysql/src/assemble/application-no-database.xml	(revision 13795)
+++ enterprise/trunk/distribution/mysql/src/assemble/application-no-database.xml	(working copy)
@@ -26,12 +26,24 @@
   </formats>
   <includeBaseDirectory>true</includeBaseDirectory>
   <dependencySets>
+    <!-- The root web application -->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
            not specified -->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
+        <include>com.xpn.xwiki.platform.tools:xwiki-rootwebapp</include>
+      </includes>
+      <outputDirectory>webapps/root</outputDirectory>
+      <unpack>true</unpack>
+    </dependencySet>
+    <dependencySet>
+      <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
+           plugin where the artifact name will be used instead of / if outputFileNameMapping is
+           not specified -->
+      <outputFileNameMapping></outputFileNameMapping>
+      <includes>
         <include>com.xpn.xwiki.products:xwiki-enterprise-web</include>
       </includes>
       <outputDirectory>webapps/xwiki</outputDirectory>
Index: enterprise/trunk/distribution/pgsql/src/assemble/application-no-database.xml
===================================================================
--- enterprise/trunk/distribution/pgsql/src/assemble/application-no-database.xml	(revision 13795)
+++ enterprise/trunk/distribution/pgsql/src/assemble/application-no-database.xml	(working copy)
@@ -26,12 +26,24 @@
   </formats>
   <includeBaseDirectory>true</includeBaseDirectory>
   <dependencySets>
+    <!-- The root web application -->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
            not specified -->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
+        <include>com.xpn.xwiki.platform.tools:xwiki-rootwebapp</include>
+      </includes>
+      <outputDirectory>webapps/root</outputDirectory>
+      <unpack>true</unpack>
+    </dependencySet>
+    <dependencySet>
+      <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
+           plugin where the artifact name will be used instead of / if outputFileNameMapping is
+           not specified -->
+      <outputFileNameMapping></outputFileNameMapping>
+      <includes>
         <include>com.xpn.xwiki.products:xwiki-enterprise-web</include>
       </includes>
       <outputDirectory>webapps/xwiki</outputDirectory>
Index: enterprise/trunk/distribution/pom.xml
===================================================================
--- enterprise/trunk/distribution/pom.xml	(revision 13795)
+++ enterprise/trunk/distribution/pom.xml	(working copy)
@@ -35,6 +35,12 @@
   <description>XWiki Products - Enterprise - Distribution - Parent POM</description>
   <dependencies>
     <dependency>
+      <groupId>com.xpn.xwiki.platform.tools</groupId>
+      <artifactId>xwiki-rootwebapp</artifactId>
+      <version>${platform.tool.rootwebapp.version}</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
       <groupId>com.xpn.xwiki.products</groupId>
       <artifactId>xwiki-enterprise-web</artifactId>
       <version>${pom.version}</version>
Index: enterprise/trunk/distribution/hsqldb/src/assemble/application.xml
===================================================================
--- enterprise/trunk/distribution/hsqldb/src/assemble/application.xml	(revision 13795)
+++ enterprise/trunk/distribution/hsqldb/src/assemble/application.xml	(working copy)
@@ -26,12 +26,24 @@
   </formats>
   <includeBaseDirectory>true</includeBaseDirectory>
   <dependencySets>
+    <!-- The root web application -->
     <dependencySet>
       <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
            plugin where the artifact name will be used instead of / if outputFileNameMapping is
            not specified -->
       <outputFileNameMapping></outputFileNameMapping>
       <includes>
+        <include>com.xpn.xwiki.platform.tools:xwiki-rootwebapp</include>
+      </includes>
+      <outputDirectory>webapps/root</outputDirectory>
+      <unpack>true</unpack>
+    </dependencySet>
+    <dependencySet>
+      <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly
+           plugin where the artifact name will be used instead of / if outputFileNameMapping is
+           not specified -->
+      <outputFileNameMapping></outputFileNameMapping>
+      <includes>
         <include>com.xpn.xwiki.products:xwiki-enterprise-web</include>
       </includes>
       <outputDirectory>webapps/xwiki</outputDirectory>
Index: enterprise/trunk/pom.xml
===================================================================
--- enterprise/trunk/pom.xml	(revision 13795)
+++ enterprise/trunk/pom.xml	(working copy)
@@ -54,6 +54,7 @@
     <platform.tool.jetty.version>1.11-SNAPSHOT</platform.tool.jetty.version>
     <platform.tool.test.version>1.14-SNAPSHOT</platform.tool.test.version>
     <platform.tool.packager.version>1.12-SNAPSHOT</platform.tool.packager.version>
+    <platform.tool.rootwebapp.version>1.0-SNAPSHOT</platform.tool.rootwebapp.version>
     <platform.core.version>1.7-SNAPSHOT</platform.core.version>
     <platform.web.version>1.7-SNAPSHOT</platform.web.version>
     <platform.panels.version>1.11-SNAPSHOT</platform.panels.version>

Property changes on: enterprise/trunk/distribution-test/webdav-tests
___________________________________________________________________
Added: svn:ignore
   + target
.classpath
.project
.settings


Index: enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/WebDAVTest.java
===================================================================
--- enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/WebDAVTest.java	(revision 0)
+++ enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/WebDAVTest.java	(revision 0)
@@ -0,0 +1,313 @@
+package com.xpn.xwiki.it;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.jackrabbit.webdav.DavServletResponse;
+import org.apache.webdav.lib.methods.DeleteMethod;
+import org.apache.webdav.lib.methods.MkcolMethod;
+import org.apache.webdav.lib.methods.MoveMethod;
+import org.apache.webdav.lib.methods.PropFindMethod;
+
+/**
+ * The integration test suite for webdav.
+ * 
+ * @version $Id$
+ */
+public class WebDAVTest extends TestCase
+{
+
+    /**
+     * Root of the webdav server.
+     */
+    private static final String ROOT_URL = "http://localhost:8080/xwiki/webdav";
+
+    /**
+     * The {@link HttpClient} used to invoke various methods on the webdav server.
+     */
+    private static HttpClient client;
+
+    /**
+     * Initializes the http client.
+     */
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        client = new HttpClient();
+        client.getState().setCredentials(
+            new AuthScope(AuthScope.ANY_HOST,
+                AuthScope.ANY_PORT,
+                AuthScope.ANY_REALM,
+                AuthScope.ANY_SCHEME), new UsernamePasswordCredentials("Admin", "admin"));
+        client.getHttpConnectionManager().getParams().setConnectionTimeout(10000);
+    }
+
+    /**
+     * Test PROPFIND request on root.
+     */
+    public void testPropFind()
+    {
+        PropFindMethod propFindMethod = new PropFindMethod(ROOT_URL);
+        propFindMethod.setDoAuthentication(true);
+        propFindMethod.setDepth(PropFindMethod.DEPTH_1);
+        try {
+            int status = client.executeMethod(propFindMethod);
+            assertEquals(DavServletResponse.SC_MULTI_STATUS, status);
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test create and delete space.
+     */
+    public void testCreateAndDeleteSpace()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test rename space.
+     */
+    public void testRenameSpace()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        String relativeDestinationPath = "/xwiki/webdav/pages/RenamedTestSpace";
+        String movedSpaceUrl = ROOT_URL + "/pages/RenamedTestSpace";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        MoveMethod moveMethod = new MoveMethod();
+        moveMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(movedSpaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            moveMethod.setPath(spaceUrl);
+            moveMethod.setDestination(relativeDestinationPath);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(moveMethod));
+            deleteMethod.setPath(movedSpaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test create and delete page.
+     */
+    public void testCreateAndDeletePage()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        String pageUrl = spaceUrl + "/TestPage";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            mkColMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            deleteMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test get page content.
+     */
+    public void testGetPageWikiContent()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        String pageUrl = spaceUrl + "/TestPage";
+        String wikiTextFileUrl = pageUrl + "/wiki.txt";
+        String wikiXMLFileUrl = pageUrl + "/wiki.xml";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        GetMethod getMethod = new GetMethod();
+        getMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            mkColMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            getMethod.setPath(wikiTextFileUrl);
+            assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
+            assertTrue(getMethod.getResponseBodyAsStream().read() != -1);
+            getMethod.setPath(wikiXMLFileUrl);
+            assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
+            assertTrue(getMethod.getResponseBodyAsStream().read() != -1);
+            deleteMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test update page content.
+     */
+    public void testUpdatePageWikiContent()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        String pageUrl = spaceUrl + "/TestPage";
+        String wikiTextFileUrl = pageUrl + "/wiki.txt";
+        String wikiXMLFileUrl = pageUrl + "/wiki.xml";
+        String newContent = "New Content";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        PutMethod putMethod = new PutMethod();
+        putMethod.setDoAuthentication(true);
+        GetMethod getMethod = new GetMethod();
+        getMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            mkColMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            putMethod.setPath(wikiTextFileUrl);
+            putMethod
+                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(newContent
+                    .getBytes())));
+            // Already existing resource, in which case SC_NO_CONTENT will be the return status.
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client.executeMethod(putMethod));
+            getMethod.setPath(wikiTextFileUrl);
+            assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
+            assertEquals(newContent, getMethod.getResponseBodyAsString());
+            putMethod.setPath(wikiXMLFileUrl);
+            putMethod
+                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(newContent
+                    .getBytes())));
+            // XML saving is not allowed, should return BAD_REQUEST status.
+            assertEquals(DavServletResponse.SC_METHOD_NOT_ALLOWED, client
+                .executeMethod(putMethod));
+            deleteMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+
+    /**
+     * Test making attachment.
+     */
+    public void testMakingAttachment()
+    {
+        String spaceUrl = ROOT_URL + "/pages/TestSpace";
+        String pageUrl = spaceUrl + "/TestPage";
+        String attachmentUrl = pageUrl + "/attachment.txt";
+        String attachmentContent = "Attachment Content";
+        DeleteMethod deleteMethod = new DeleteMethod();
+        deleteMethod.setDoAuthentication(true);
+        MkcolMethod mkColMethod = new MkcolMethod();
+        mkColMethod.setDoAuthentication(true);
+        PutMethod putMethod = new PutMethod();
+        putMethod.setDoAuthentication(true);
+        GetMethod getMethod = new GetMethod();
+        getMethod.setDoAuthentication(true);
+        try {
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            mkColMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            mkColMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
+            getMethod.setPath(attachmentUrl);
+            assertEquals(DavServletResponse.SC_NOT_FOUND, client.executeMethod(getMethod));
+            putMethod.setPath(attachmentUrl);
+            putMethod
+                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(attachmentContent
+                    .getBytes())));
+            assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(putMethod));
+            getMethod.setPath(attachmentUrl);
+            assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
+            assertEquals(attachmentContent, getMethod.getResponseBodyAsString());
+            deleteMethod.setPath(attachmentUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(pageUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+            deleteMethod.setPath(spaceUrl);
+            assertEquals(DavServletResponse.SC_NO_CONTENT, client
+                .executeMethod(deleteMethod));
+        } catch (HttpException ex) {
+            fail(ex.getMessage());
+        } catch (IOException ex) {
+            fail(ex.getMessage());
+        }
+    }
+}
Index: enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/AllTests.java
===================================================================
--- enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/AllTests.java	(revision 0)
+++ enterprise/trunk/distribution-test/webdav-tests/src/test/it/com/xpn/xwiki/it/AllTests.java	(revision 0)
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+package com.xpn.xwiki.it;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import com.xpn.xwiki.test.XWikiTestSetup;
+
+/**
+ * A class listing all the Functional tests to execute. We need such a class (rather than
+ * letting the JUnit Runner discover the different TestCases classes by itself) because we want to
+ * start/stop XWiki before and after the tests start (but only once).
+ * 
+ * @version $Id: $
+ */
+public class AllTests extends TestCase
+{
+    private static final String PATTERN = ".*" + System.getProperty("pattern", "");
+
+    public static Test suite() throws Exception
+    {
+        TestSuite suite = new TestSuite();
+        addTestCase(suite, WebDAVTest.class);
+        return new XWikiTestSetup(suite);
+    }
+
+    @SuppressWarnings("unchecked")
+    private static void addTestCase(TestSuite suite, Class testClass) throws Exception
+    {
+        if (testClass.getName().matches(PATTERN)) {
+            suite.addTest(new TestSuite(testClass));
+        }
+    }
+}
Index: enterprise/trunk/distribution-test/webdav-tests/pom.xml
===================================================================
--- enterprise/trunk/distribution-test/webdav-tests/pom.xml	(revision 0)
+++ enterprise/trunk/distribution-test/webdav-tests/pom.xml	(revision 0)
@@ -0,0 +1,90 @@
+<?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 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>
+  <parent>
+    <groupId>com.xpn.xwiki.products</groupId>
+    <artifactId>xwiki-enterprise-test</artifactId>
+    <version>1.7-SNAPSHOT</version>
+  </parent>
+  <artifactId>xwiki-enterprise-test-webdav</artifactId>
+  <name>XWiki Products - Enterprise - WebDAV Functional Tests</name>
+  <packaging>pom</packaging>
+  <description>XWiki Products - Enterprise - WebDAV Functional
+    Tests</description>
+  <dependencies>
+    <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>slide</groupId>
+      <artifactId>webdavlib</artifactId>
+      <version>2.1M1</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-server</artifactId>
+      <version>1.4</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <!--
+        Step 1: Compile the JUnit WebDAV Tests and copy test resources
+        files
+      -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+      </plugin>
+      <!--
+        Step 2: Create jar containing integration tests which will be
+        installed
+      -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+      </plugin>
+      <!-- Step 3: Unpack the application -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+      </plugin>
+      <!-- Step 4: Start XWiki, Execute the tests and Stop XWiki -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration> 
+          <!-- Display report on screen when all tests are completed -->
+          <useFile>false</useFile>
+          <reportFormat>plain</reportFormat>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file
Index: platform/trunks/core/pom.xml
===================================================================
--- platform/trunks/core/pom.xml	(revision 13795)
+++ platform/trunks/core/pom.xml	(working copy)
@@ -70,6 +70,6 @@
     <module>xwiki-rendering</module>
     <module>xwiki-configuration</module>
     <module>xwiki-query</module>
-    <!-- module>xwiki-webdav</module -->
+    <module>xwiki-webdav</module>
   </modules>
 </project>
Index: platform/trunks/core/xwiki-webdav/src/test/java/com/xpn/xwiki/plugin/webdav/tests/XWikiDavITest.java
===================================================================
--- platform/trunks/core/xwiki-webdav/src/test/java/com/xpn/xwiki/plugin/webdav/tests/XWikiDavITest.java	(revision 13795)
+++ platform/trunks/core/xwiki-webdav/src/test/java/com/xpn/xwiki/plugin/webdav/tests/XWikiDavITest.java	(working copy)
@@ -1,340 +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.
- */
-package com.xpn.xwiki.plugin.webdav.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
-import org.apache.commons.httpclient.methods.PutMethod;
-import org.apache.jackrabbit.webdav.DavServletResponse;
-import org.apache.webdav.lib.methods.DeleteMethod;
-import org.apache.webdav.lib.methods.MkcolMethod;
-import org.apache.webdav.lib.methods.MoveMethod;
-import org.apache.webdav.lib.methods.PropFindMethod;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * The integration test suite for webdav.
- * 
- * @version $Id$
- */
-public class XWikiDavITest
-{
-    /**
-     * Root of the webdav server.
-     */
-    private static final String ROOT_URL = "http://localhost:8080/xwiki/webdav";
-
-    /**
-     * The {@link HttpClient} used to invoke various methods on the webdav server.
-     */
-    private static HttpClient client;
-
-    /**
-     * Initializes the http client.
-     */
-    @BeforeClass
-    public static void setUp()
-    {
-        client = new HttpClient();
-        client.getState().setCredentials(
-            new AuthScope(AuthScope.ANY_HOST,
-                AuthScope.ANY_PORT,
-                AuthScope.ANY_REALM,
-                AuthScope.ANY_SCHEME), new UsernamePasswordCredentials("Admin", "admin"));
-        client.getHttpConnectionManager().getParams().setConnectionTimeout(10000);
-    }
-
-    /**
-     * Test PROPFIND request on root.
-     */
-    @Test
-    public void testPropFind()
-    {
-        PropFindMethod propFindMethod = new PropFindMethod(ROOT_URL);
-        propFindMethod.setDoAuthentication(true);
-        propFindMethod.setDepth(PropFindMethod.DEPTH_1);
-        try {
-            int status = client.executeMethod(propFindMethod);
-            Assert.assertEquals(DavServletResponse.SC_MULTI_STATUS, status);
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test create and delete space.
-     */
-    @Test
-    public void testCreateAndDeleteSpace()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test rename space.
-     */
-    @Test
-    public void testRenameSpace()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        String relativeDestinationPath = "/xwiki/webdav/pages/RenamedTestSpace";
-        String movedSpaceUrl = ROOT_URL + "/pages/RenamedTestSpace";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        MoveMethod moveMethod = new MoveMethod();
-        moveMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(movedSpaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            moveMethod.setPath(spaceUrl);
-            moveMethod.setDestination(relativeDestinationPath);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(moveMethod));
-            deleteMethod.setPath(movedSpaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test create and delete page.
-     */
-    @Test
-    public void testCreateAndDeletePage()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        String pageUrl = spaceUrl + "/TestPage";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            mkColMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            deleteMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test get page content.
-     */
-    @Test
-    public void testGetPageWikiContent()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        String pageUrl = spaceUrl + "/TestPage";
-        String wikiTextFileUrl = pageUrl + "/wiki.txt";
-        String wikiXMLFileUrl = pageUrl + "/wiki.xml";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        GetMethod getMethod = new GetMethod();
-        getMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            mkColMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            getMethod.setPath(wikiTextFileUrl);
-            Assert.assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
-            Assert.assertTrue(getMethod.getResponseBodyAsStream().read() != -1);
-            getMethod.setPath(wikiXMLFileUrl);
-            Assert.assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
-            Assert.assertTrue(getMethod.getResponseBodyAsStream().read() != -1);
-            deleteMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test update page content.
-     */
-    @Test
-    public void testUpdatePageWikiContent()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        String pageUrl = spaceUrl + "/TestPage";
-        String wikiTextFileUrl = pageUrl + "/wiki.txt";
-        String wikiXMLFileUrl = pageUrl + "/wiki.xml";
-        String newContent = "New Content";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        PutMethod putMethod = new PutMethod();
-        putMethod.setDoAuthentication(true);
-        GetMethod getMethod = new GetMethod();
-        getMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            mkColMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            putMethod.setPath(wikiTextFileUrl);
-            putMethod
-                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(newContent
-                    .getBytes())));
-            // Already existing resource, in which case SC_NO_CONTENT will be the return status.
-            Assert
-                .assertEquals(DavServletResponse.SC_NO_CONTENT, client.executeMethod(putMethod));
-            getMethod.setPath(wikiTextFileUrl);
-            Assert.assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
-            Assert.assertEquals(newContent, getMethod.getResponseBodyAsString());
-            putMethod.setPath(wikiXMLFileUrl);
-            putMethod
-                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(newContent
-                    .getBytes())));
-            // XML saving is not allowed, should return BAD_REQUEST status.
-            Assert.assertEquals(DavServletResponse.SC_METHOD_NOT_ALLOWED, client
-                .executeMethod(putMethod));
-            deleteMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-
-    /**
-     * Test making attachment.
-     */
-    @Test
-    public void testMakingAttachment()
-    {
-        String spaceUrl = ROOT_URL + "/pages/TestSpace";
-        String pageUrl = spaceUrl + "/TestPage";
-        String attachmentUrl = pageUrl + "/attachment.txt";
-        String attachmentContent = "Attachment Content";
-        DeleteMethod deleteMethod = new DeleteMethod();
-        deleteMethod.setDoAuthentication(true);
-        MkcolMethod mkColMethod = new MkcolMethod();
-        mkColMethod.setDoAuthentication(true);
-        PutMethod putMethod = new PutMethod();
-        putMethod.setDoAuthentication(true);
-        GetMethod getMethod = new GetMethod();
-        getMethod.setDoAuthentication(true);
-        try {
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            mkColMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            mkColMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(mkColMethod));
-            getMethod.setPath(attachmentUrl);
-            Assert.assertEquals(DavServletResponse.SC_NOT_FOUND, client.executeMethod(getMethod));
-            putMethod.setPath(attachmentUrl);
-            putMethod
-                .setRequestEntity(new InputStreamRequestEntity(new ByteArrayInputStream(attachmentContent
-                    .getBytes())));
-            Assert.assertEquals(DavServletResponse.SC_CREATED, client.executeMethod(putMethod));
-            getMethod.setPath(attachmentUrl);
-            Assert.assertEquals(DavServletResponse.SC_OK, client.executeMethod(getMethod));
-            Assert.assertEquals(attachmentContent, getMethod.getResponseBodyAsString());
-            deleteMethod.setPath(attachmentUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(pageUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-            deleteMethod.setPath(spaceUrl);
-            Assert.assertEquals(DavServletResponse.SC_NO_CONTENT, client
-                .executeMethod(deleteMethod));
-        } catch (HttpException ex) {
-            Assert.fail(ex.getMessage());
-        } catch (IOException ex) {
-            Assert.fail(ex.getMessage());
-        }
-    }
-}
Index: platform/trunks/core/xwiki-webdav/src/test/resources/WEB-INF/xwiki.properties
===================================================================
--- platform/trunks/core/xwiki-webdav/src/test/resources/WEB-INF/xwiki.properties	(revision 0)
+++ platform/trunks/core/xwiki-webdav/src/test/resources/WEB-INF/xwiki.properties	(revision 0)
@@ -0,0 +1,17 @@
+# This is the new XWiki configuration file. In the future it'll replace the old
+# xwiki.cfg file. However right now it's only used by some XWiki components.
+# As time progresses more and more component will get their configurations from
+# this file.
+
+#-------------------------------------------------------------------------------------
+# Cache
+#-------------------------------------------------------------------------------------
+
+#-# [Since 1.7M1]
+#-# The cache component implementation to use as "normal" (can be local or distributed depending on the implementation)
+#-# cache component.
+# cache.cacheHint=jbosscache
+
+#-# [Since 1.7M1]
+#-# The cache component to use as local cache component. 
+# cache.localCacheHint=jbosscache/local
\ No newline at end of file
Index: platform/trunks/core/xwiki-webdav/pom.xml
===================================================================
--- platform/trunks/core/xwiki-webdav/pom.xml	(revision 13795)
+++ platform/trunks/core/xwiki-webdav/pom.xml	(working copy)
@@ -32,67 +32,15 @@
   <name>XWiki Platform - Core - WebDAV</name>
   <description>Service for accessing XWiki through WebDAV</description>
   <build>
-    <plugins>
+    <plugins>      
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <includes>
-            <include>**/*TTest.java</include>
-          </includes>
-        </configuration>
-        <executions>
-          <execution>
-            <id>surefire-it</id>
-            <phase>integration-test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <includes>
-                <include>**/*ITest.java</include>
-              </includes>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jetty-maven-plugin</artifactId>
         <version>7.0.0pre3</version>
         <configuration>
           <webAppSourceDirectory>${basedir}/target/test-classes</webAppSourceDirectory>
           <contextPath>/xwiki</contextPath>
-          <scanIntervalSeconds>10</scanIntervalSeconds>
-          <stopKey>foo</stopKey>
-          <stopPort>9966</stopPort>
-        </configuration>
-        <executions>
-          <execution>
-            <id>start-jetty</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <scanIntervalSeconds>0</scanIntervalSeconds>
-              <daemon>true</daemon>
-            </configuration>
-          </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>
+        </configuration>        
       </plugin>
     </plugins>
     <testResources>
Index: platform/trunks/web/standard/src/main/webapp/WEB-INF/web.xml
===================================================================
--- platform/trunks/web/standard/src/main/webapp/WEB-INF/web.xml	(revision 13795)
+++ platform/trunks/web/standard/src/main/webapp/WEB-INF/web.xml	(working copy)
@@ -47,6 +47,12 @@
     <filter-class>com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter</filter-class>
   </filter>
 
+  <!-- Filter used to 'steal' webdav requests made to the application root -->
+  <filter>
+    <filter-name>DavFilter</filter-name>
+    <filter-class>com.xpn.xwiki.plugin.webdav.DavFilter</filter-class>
+  </filter>
+
   <!-- The encoding filter MUST always be the first one, as setting the encoding does not work after accessing the request data. -->
   <filter-mapping>
     <filter-name>Set Character Encoding</filter-name>
@@ -63,6 +69,11 @@
     <url-pattern>/*</url-pattern>
   </filter-mapping>
 
+  <filter-mapping>
+    <filter-name>DavFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
   <!-- 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>
@@ -143,9 +154,21 @@
     <servlet-class>com.xpn.xwiki.wysiwyg.server.DefaultWysiwygService</servlet-class>
   </servlet>
 
+  <!-- WebDAV servlet -->
+  <servlet>
+   <servlet-name>webdav</servlet-name>
+   <servlet-class>com.xpn.xwiki.plugin.webdav.DavServlet</servlet-class>
+  </servlet>
+
   <!-- Unused mapping for now. In the future the correct mapping will be /* when the action servlet
        will be decommissioned in favor of the XWiki Action component --> 
+
   <servlet-mapping>
+   <servlet-name>webdav</servlet-name>
+   <url-pattern>/webdav/*</url-pattern>
+  </servlet-mapping>
+       
+  <servlet-mapping>
     <servlet-name>PlexusServlet</servlet-name>
     <url-pattern>/plexus/*</url-pattern>
   </servlet-mapping>
Index: platform/trunks/web/standard/pom.xml
===================================================================
--- platform/trunks/web/standard/pom.xml	(revision 13795)
+++ platform/trunks/web/standard/pom.xml	(working copy)
@@ -55,6 +55,12 @@
       <artifactId>xwiki-core-plexus</artifactId>
       <version>${platform.core.version}</version>
     </dependency>
+    <!-- The WebDAV module -->
+    <dependency>
+      <groupId>com.xpn.xwiki.platform</groupId>
+      <artifactId>xwiki-webdav</artifactId>
+      <version>${platform.core.version}</version>
+    </dependency>
     <!-- needed for slf4j clients such as QueryPlugin and JCRStore 
          It is deployment time logging configuration, so it is here instead of xwiki-core. -->
     <dependency>
Index: platform/trunks/plugins/webdav/pom.xml
===================================================================
--- platform/trunks/plugins/webdav/pom.xml	(revision 13795)
+++ platform/trunks/plugins/webdav/pom.xml	(working copy)
@@ -33,16 +33,19 @@
   <artifactId>xwiki-plugin-webdav</artifactId>
   <name>XWiki Platform - Plugins - WebDAV</name>
   <version>1.0-SNAPSHOT</version>
+  <properties>    
+    <platform.core.version>1.7-SNAPSHOT</platform.core.version>
+  </properties>
   <dependencies>
     <dependency>
       <groupId>com.xpn.xwiki.platform</groupId>
       <artifactId>xwiki-core</artifactId>
-      <version>1.7-SNAPSHOT</version>
+      <version>${platform.core.version}</version>
     </dependency>
     <dependency>
       <groupId>com.xpn.xwiki.platform</groupId>
       <artifactId>xwiki-webdav</artifactId>
-      <version>1.0-SNAPSHOT</version>
+      <version>${platform.core.version}</version>
     </dependency>
   </dependencies>
 </project>
Index: platform/trunks/tools/xwiki-rootwebapp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- platform/trunks/tools/xwiki-rootwebapp/src/main/webapp/WEB-INF/web.xml	(revision 13795)
+++ platform/trunks/tools/xwiki-rootwebapp/src/main/webapp/WEB-INF/web.xml	(working copy)
@@ -24,7 +24,7 @@
 
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 <web-app id="WebApp_ID">
-  <display-name>XWiki</display-name>
+  <display-name>xwiki-root</display-name>
   <servlet>		
     <servlet-name>XWikiDispatcherServlet</servlet-name>
     <servlet-class>com.xpn.xwiki.XWikiRootServlet</servlet-class>
