<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.atlassian.confluence</groupId>
        <artifactId>confluence-project</artifactId>
        <version>5.8-m19</version>
        <relativePath>../../..</relativePath>
    </parent>

    <groupId>com.atlassian.confluence.plugins</groupId>
    <artifactId>confluence-functest-rest-plugin</artifactId>

    <name>Confluence REST Plugin for Functional Tests</name>
    <description>Provides a set of REST resources for use with functional tests</description>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <license.scope>test</license.scope>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <!-- This filtering strategy is intentionally weird to trick the IDEA plugin into including the directory in the classpath -->
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>atlassian-plugin.xml</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>atlassian-plugin.xml</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <configuration>
                    <skipAllPrompts>true</skipAllPrompts>
                    <extractDependencies>false</extractDependencies>
                    <productVersion>${project.version}</productVersion>
                    <productDataVersion>${project.version}</productDataVersion>
                    <systemPropertyVariables>
                        <confluence.context.batching.disable>true</confluence.context.batching.disable>
                        <plugin.webresource.batching.off>true</plugin.webresource.batching.off>
                    </systemPropertyVariables>
                </configuration>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <goals>
                            <goal>generate-manifest</goal>
                            <goal>copy-bundled-dependencies</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                    <execution>
                        <id>prepare-package</id>
                        <goals>
                            <goal>validate-manifest</goal>
                        </goals>
                        <phase>prepare-package</phase>
                    </execution>
                    <execution>
                        <id>package</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
