<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.applinks</groupId>
        <artifactId>applinks-parent</artifactId>
        <version>4.1.2</version>
    </parent>

    <artifactId>applinks-plugin</artifactId>
    <name>Applinks Product Plugin</name>
    <description>Plugin that facilitates discovery, connections and authentication with remote applications</description>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <!-- override these to support multiple instances without clashing -->
        <applinks.build.directory>${basedir}/target</applinks.build.directory>
        <http.port>5990</http.port>
        <jvm.debug.port>5001</jvm.debug.port>
    </properties>

    <profiles>
        <profile>
            <id>refapp2</id>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp2</applinks.build.directory>
                <http.port>5992</http.port>
                <jvm.debug.port>5002</jvm.debug.port>
            </properties>
        </profile>
        <profile>
            <id>refapp3</id>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp3</applinks.build.directory>
                <http.port>5993</http.port>
                <jvm.debug.port>5003</jvm.debug.port>
            </properties>
        </profile>
    </profiles>

    <build>
        <directory>${applinks.build.directory}</directory>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <products>
                        <product>
                            <id>refapp</id>
                            <version>${platform.version}</version>
                        </product>
                    </products>
                    <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                    <instructions>
                        <Spring-Context>
                            *;timeout:=60
                        </Spring-Context>
                        <Import-Package>
                            javax.xml.bind*;version="2.1.0",
                            com.atlassian.jira.project;resolution:=optional,
                            com.cenqua.fisheye;resolution:=optional,
                            com.atlassian.confluence.spaces;resolution:=optional,
                            com.atlassian.bamboo.build;resolution:=optional,
                            net.oauth.*;version=20090617;resolution:=required,
                            org.json;resolution:=required,
                            com.atlassian.plugins.rest.common*;version=0.0.0,
                            com.atlassian.plugin.webresource*;version=0.0.0,
                            com.atlassian.sal.api.net.auth,
                            com.atlassian.sal.api*,
                            com.atlassian.velocity.htmlsafe;version=!,
                            com.atlassian.security.auth.trustedapps,
                            com.atlassian.templaterenderer*;version=!,
                            org.springframework.beans.factory;version="2.5",
                            org.springframework.beans.factory.annotation;version="2.5",
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                    <libArtifacts>
                        <libArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>applinks-api</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>applinks-host</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.applinks</groupId>
                            <artifactId>applinks-spi</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                </libArtifacts>
                <pluginArtifacts>
                    <!-- uncomment to start refapp with applinks-tests plugin installed -->
                    <!--<pluginArtifact>-->
                        <!--<groupId>${project.groupId}</groupId>-->
                        <!--<artifactId>applinks-tests</artifactId>-->
                        <!--<version>${project.version}</version>-->
                    <!--</pluginArtifact>-->
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-api</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-consumer-spi</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-service-provider-spi</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-consumer-sal-plugin</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-consumer-plugin</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-service-provider-plugin</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-service-provider-sal-plugin</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.oauth</groupId>
                        <artifactId>atlassian-oauth-admin-plugin</artifactId>
                        <version>${oauth.version}</version>
                    </pluginArtifact>
                    <pluginArtifact>
                        <groupId>com.atlassian.labs</groupId>
                        <artifactId>fastdev-plugin</artifactId>
                        <version>1.1.1</version>
                    </pluginArtifact>
                </pluginArtifacts>
               </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-host</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-spi</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
            <version>1.1.beta1</version>
            <scope>provided</scope>
            <!-- Working around http://jira.codehaus.org/browse/MNG-2742 - depends on version range [1.5,1.7) -->
            <exclusions>
                <exclusion>
                    <groupId>org.apache.velocity</groupId>
                    <artifactId>velocity</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-spring</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>2.5.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bundles</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${org.json.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-service-provider-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <version>20090617</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security.auth.trustedapps</groupId>
            <artifactId>atlassian-trusted-apps-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-sal-plugin</artifactId>
            <version>${platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
            <exclusions>
                <!-- In order to be able to use slf4j-nop for tests, this must be excluded -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

</project>
