<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-parent</artifactId>
        <version>5.2.2-f5c834bd6</version>
    </parent>

    <artifactId>atlassian-plugins-refimpl-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Atlassian Plugins - Reference Implementation Plugin</name>
    <description>A plugin that allow testing of the Atlassian Plugins module types</description>

    <properties>
        <amps.version>6.3.21</amps.version>
        <tomcat.version>tomcat85x</tomcat.version>
        <refapp.version>5.0.2</refapp.version>

        <jersey.version>1.19</jersey.version>
        <commons-httpclient.version>3.1</commons-httpclient.version>
        <json-lib.version>2.4</json-lib.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>${commons-httpclient.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>${json-lib.version}</version>
            <classifier>${json-lib.classifier}</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <extensions>true</extensions>
                <version>${amps.version}</version>
                <configuration>
                    <containerId>${tomcat.version}</containerId>
                    <productVersion>${refapp.version}</productVersion>
                    <log4jProperties>${basedir}/src/main/webapp/log4j.properties</log4jProperties>
                    <instructions>
                        <Import-Package>
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                    <systemPropertyVariables>
                        <allowXOrigin>true</allowXOrigin>
                    </systemPropertyVariables>
                    <products>
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp1</instanceId>
                            <httpPort>5990</httpPort>
                            <version>${refapp.version}</version>
                            <output>${build.directory}/out.log</output>
                            <systemPropertyVariables>
                                <atlassian.allow.jsonp>true</atlassian.allow.jsonp>
                            </systemPropertyVariables>
                        </product>
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp2</instanceId>
                            <httpPort>5992</httpPort>
                            <version>${refapp.version}</version>
                        </product>
                    </products>

                    <libArtifacts>
                        <libArtifact>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>atlassian-plugins-api</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>atlassian-plugins-core</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>atlassian-plugins-servlet</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.event</groupId>
                            <artifactId>atlassian-event</artifactId>
                        </libArtifact>
                    </libArtifacts>

                    <testGroups>
                        <testGroup>
                            <id>refapp_jsonp_enabled</id>
                            <productIds>
                                <productId>refapp1</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>refapp_jsonp_disabled</id>
                            <productIds>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
