<?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.auinext</groupId>
        <artifactId>workspace</artifactId>
        <version>9.11.0-90bcb7e01</version>
    </parent>
    <artifactId>p2-harness</artifactId>

    <name>AUI Next - Test harness</name>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <!-- Project -->
        <dependency>
            <groupId>com.atlassian.aui</groupId>
            <artifactId>auiplugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Compile scope -->
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>sinonjs</artifactId>
            <version>1.17.2</version>
            <scope>compile</scope>
        </dependency>

        <!-- Platform 1st party provided -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>jquery</artifactId>
            <version>${jquery.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-api</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Platform 3rd party provided -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${root.location}packages/soy/src</directory>
            </resource>
            <resource>
                <directory>${root.location}tests/test-pages</directory>
            </resource>
            <resource>
                <directory>src/main/resources/test-pages</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <enableDevToolbox>false</enableDevToolbox>
                    <products>
                        <product>
                            <id>refapp</id>
                            <version>${refapp.version}</version>
                        </product>
                    </products>
                    <httpPort>${http.port}</httpPort>
                    <jvmDebugPort>8905</jvmDebugPort>
                    <jvmDebugSuspend>false</jvmDebugSuspend>
                    <contextPath>${context.path}</contextPath>
                    <closureJsCompiler>false</closureJsCompiler>
                    <compressJs>false</compressJs>
                    <compressResources>false</compressResources>
                    <enableQuickReload>true</enableQuickReload>

                    <systemPropertyVariables>
                        <atlassian.disable.caches>false</atlassian.disable.caches>
                        <atlassian.dev.mode>true</atlassian.dev.mode>
                    </systemPropertyVariables>

                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>jquery</artifactId>
                            <version>${jquery.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.aui</groupId>
                            <artifactId>auiplugin</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
            </plugin>
        </plugins>
    </build>

    <properties>
        <atlassian.spring.scanner.version>2.2.6</atlassian.spring.scanner.version>
        <soy.version>5.1.3</soy.version>
        <jquery.version>3.5.1</jquery.version>

        <!-- Test harness stuff -->
        <http.port>9999</http.port>
        <context.path>/ajs</context.path>

        <!-- We have some external dependencies that end up in the plugin file system
             and need manual translating in to web-resources. -->
        <sinonjs.output.dir>META-INF/resources/webjars/sinonjs/1.17.2/sinon.js</sinonjs.output.dir>

        <!-- 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>
        <root.location>${basedir}/../../</root.location>
    </properties>

</project>
