<?xml version="1.0" encoding="UTF-8"?>
<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.crowd</groupId>
        <artifactId>atlassian-crowd</artifactId>
        <version>2.10.1-rc3</version>
    </parent>
    <artifactId>crowd-wired-tests</artifactId>

    <name>Crowd wired tests</name>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-core</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>


        <!-- amps uses these to launch the instance, add a dependency so the reactor is ordered correctly -->
        <dependency>
            <groupId>com.atlassian.crowd.distribution</groupId>
            <artifactId>crowd-plugin-test-resources</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-standalone-distribution</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>pom</type>
        </dependency>

        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-crowd-plugin</artifactId>
                <version>${atlassian.sdk.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${project.version}</productVersion>
                    <productDataVersion>${project.version}</productDataVersion>
                    <enableQuickReload>true</enableQuickReload>
                    <enableFastdev>false</enableFastdev>
                    <skipManifestValidation>true</skipManifestValidation>
                    <skipUTs>true</skipUTs>
                    <extractDependencies>false</extractDependencies>
                    <extractTestDependencies>false</extractTestDependencies>

                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>

                        <!-- Add package import here -->
                        <Import-Package>
                            org.springframework.osgi.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",
                        </Import-Package>

                        <!-- Ensure plugin is spring powered -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <plugin.testrunner.version>1.2.3-bamboo-5</plugin.testrunner.version>
        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>

</project>
