<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.atlassian.confluence.plugin.base</groupId>
        <artifactId>confluence-plugin-base</artifactId>
        <version>22</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atlassian.confluence.extra.webdav</groupId>
    <artifactId>webdav-plugin</artifactId>
    <version>2.4</version>

    <packaging>atlassian-plugin</packaging>

    <name>WebDAV Plugin</name>
    <description>This plugin allows clients to access Confluence content using the WebDAV standard.</description>

    <scm>
        <connection>scm:svn:https://svn.atlassian.com/svn/public/contrib/confluence/webdav-plugin/tags/webdav-plugin-2.4</connection>
        <developerConnection>scm:svn:https://svn.atlassian.com/svn/public/contrib/confluence/webdav-plugin/tags/webdav-plugin-2.4</developerConnection>
        <url>http://svn.atlassian.com/fisheye/browse/public/contrib/confluence/webdav-plugin/tags/webdav-plugin-2.4</url>
    </scm>

    <dependencies>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-webdav</artifactId>
            <version>1.4</version>
            <exclusions>
                <!-- JCR-683: The commons-httpclient dependency from            -->
                <!-- jackrabbit-webapp depends on commons-logging. Since this   -->
                <!-- webapp uses log4j (see the slf4j-log4j12 dependency below) -->
                <!-- for logging, we need to override this dependency with the  -->
                <!-- jcl104-over-sflf4j dependency given below.                 -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-jcr-server</artifactId>
            <version>1.4</version>
            <exclusions>
                <!-- JCR-683: The commons-httpclient dependency from            -->
                <!-- jackrabbit-webapp depends on commons-logging. Since this   -->
                <!-- webapp uses log4j (see the slf4j-log4j12 dependency below) -->
                <!-- for logging, we need to override this dependency with the  -->
                <!-- jcl104-over-sflf4j dependency given below.                 -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.3.0</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- JCR-683: Use jcl104-over-slf4j instead of the commons-logging -->
        <!-- dependency excluded above                                     -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl104-over-slf4j</artifactId>
            <version>1.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <atlassian.plugin.key>confluence.extra.webdav</atlassian.plugin.key>
        <atlassian.plugin.application.version.min>3.0</atlassian.plugin.application.version.min>
        <atlassian.plugin.application.version.max>3.0</atlassian.plugin.application.version.max>

        <atlassian.product.version>3.0</atlassian.product.version>
        <atlassian.product.data.version>2.10</atlassian.product.data.version>
        <atlassian.product.test-lib.version>2.1.4</atlassian.product.test-lib.version>

        <confluence.jars.to.remove.regex.list>${basedir}/src/test/resources/jar-files-to-remove-from-bundle.txt
        </confluence.jars.to.remove.regex.list>
        <confluence.plugin.bundled>true</confluence.plugin.bundled>

        <jdkLevel>1.5</jdkLevel>
    </properties>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>site-export.zip</include>
                    <include>jar-files-to-remove-from-bundle.txt</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>site-export.zip</exclude>
                    <exclude>jar-files-to-remove-from-bundle.txt</exclude>
                </excludes>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>pre-integration-test-user-ant-tasks</id>
                        <configuration>
                            <tasks>
                                <echo file="${project.build.directory}/test-classes/test.properties">
                                    <![CDATA[
webdav.host=localhost
webdav.port=${http.port}
webdav.context=confluence
webdav.resource.path.prefix=/plugins/servlet/confluence/default
]]>
                                </echo>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
                <configuration>
                  <commands>
                    <pi>clean package com.atlassian.maven.plugins:atlassian-pdk:install</pi>
                    <pu>com.atlassian.maven.plugins:atlassian-pdk:uninstall</pu>
                  </commands>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
