<?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.plugins</groupId>
        <artifactId>atlassian-nav-links</artifactId>
        <version>3.3.9</version>
    </parent>

    <artifactId>atlassian-nav-links-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Atlassian Navigation Links Plugin</name>
    <description>Capabilities and Navigation API client and server implementation</description>

    <dependencies>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-failure-cache</artifactId>
            <version>${failure.cache.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-nav-links-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-nav-links-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</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>com.atlassian.jersey-library</artifactId>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-host</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-spi</artifactId>
            <scope>provided</scope>
        </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>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
        </dependency>
        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
        </dependency>

        <!-- Test Resources -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.federation</groupId>
            <artifactId>federated-api-ctk-test-utilities</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>atlassian-confluence-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-test-support</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-webdriver-test</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-pageobjects</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-ui-test</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
            <version>${project.version}</version>
            <type>atlassian-plugin</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                    </includes>
                    <!-- Do not run integration / functional tests -->
                    <excludes>
                        <exclude>it/**/*</exclude>
                        <exclude>**/*$*</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            com.atlassian.plugins.custom_apps.api,
                            com.atlassian.plugins.navlink.consumer.menu.services,
                            com.atlassian.plugins.navlink.producer.navigation,
                            com.atlassian.plugins.navlink.producer.navigation.links,
                            com.atlassian.plugins.navlink.producer.navigation.services,
                            com.atlassian.plugins.navlink.producer.navigation.rest,
                            com.atlassian.plugins.navlink.producer.navigation.plugin,
                            com.atlassian.plugins.navlink.producer.capabilities.plugin,
                            com.atlassian.plugins.navlink.producer.contentlinks.services,
                            com.atlassian.plugins.navlink.producer.contentlinks.plugin,
                            com.atlassian.plugins.navlink.util,
                            com.atlassian.plugins.navlink.producer.contentlinks.customcontentlink,
                            com.atlassian.plugins.navlink.spi*,
                            com.atlassian.plugins.capabilities.api*
                        </Export-Package>
                        <Import-Package>
                            com.atlassian.templaterenderer*;version="[${template.renderer.version},3)",
                            org.joda.time*;resolution:=optional;version="[1.6,3)",
                            com.atlassian.fugue*,
                            org.springframework.beans.factory;version="2.5",
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                    <parallel>${amps.parallel}</parallel>
                    <enableDevToolbox>${use.amps.devtools}</enableDevToolbox>
                    <enableFastdev>${use.amps.devtools}</enableFastdev>
                    <extractDependencies>false</extractDependencies>
                    <products>
                        <product>
                            <id>bamboo</id>
                            <version>${bamboo.version}</version>
                            <dataVersion>${bamboo.data.version}</dataVersion>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                            <output>${project.build.directory}/bamboo.log</output>
                            <jvmArgs>-Dbamboo.darkfeature.rotp=true -Dbamboo.darkfeature.app-switcher.new=true -Dbamboo.darkfeature.rotp.admin.shortcuts=true -Datlassian.darkfeature.rotp.project.shortcuts=true ${additional.jvmArgs}</jvmArgs>
                            <jvmDebugPort>5007</jvmDebugPort>
                        </product>
                        <product>
                            <id>confluence</id>
                            <version>${confluence.version}</version>
                            <dataVersion>${confluence.data.version}</dataVersion>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functestrpc-plugin</artifactId>
                                    <version>${confluence.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.aui</groupId>
                                    <artifactId>auiplugin</artifactId>
                                    <version>5.0-m26</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                            <jvmArgs>-Datlassian.darkfeature.app-switcher.new=true -Datlassian.darkfeature.rotp.admin.shortcuts=true -Datlassian.darkfeature.rotp.project.shortcuts=true ${additional.jvmArgs}</jvmArgs>
                            <jvmDebugPort>5005</jvmDebugPort>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/confluence.log</output>
                        </product>
                        <product>
                            <id>confluence</id>
                            <instanceId>confluence-old-api</instanceId>
                            <version>${confluence.old.version}</version>
                            <dataVersion>${confluence.old.data.version}</dataVersion>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functestrpc-plugin</artifactId>
                                    <version>${confluence.old.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/confluence-old-api.log</output>
                            <installPlugin>false</installPlugin>
                            <enableFastdev>false</enableFastdev>
                            <enableDevToolbox>false</enableDevToolbox>
                            <enablePde>false</enablePde>
                            <systemPropertyVariables>
                                <plugin.resource.directories>${empty.resource.dir}</plugin.resource.directories>
                                <plugin.root.directories>${empty.resource.dir}</plugin.root.directories>
                            </systemPropertyVariables>
                        </product>
                        <product>
                            <id>fecru</id>
                            <version>${fecru.version}</version>
                            <dataVersion>${fecru.data.version}</dataVersion>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                            <jvmArgs>-Dfisheye.rotp.enabled=true -Datlassian.darkfeature.app-switcher.new=true -Datlassian.darkfeature.rotp.admin.shortcuts=true -Datlassian.darkfeature.rotp.project.shortcuts=true ${additional.jvmArgs}</jvmArgs>
                            <output>${project.build.directory}/fecru.log</output>
                            <jvmDebugPort>5008</jvmDebugPort>
                        </product>
                        <product>
                            <id>jira</id>
                            <version>${jira.version}</version>
                            <dataVersion>${jira.data.version}</dataVersion>
                            <bundledArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${jira.testkit.version}</version>
                                </pluginArtifact>
                            </bundledArtifacts>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-nav-links-func-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                            <jvmArgs>-Datlassian.darkfeature.app-switcher.new=true -Datlassian.darkfeature.rotp.admin.shortcuts=true -Datlassian.darkfeature.rotp.project.shortcuts=true ${additional.jvmArgs}</jvmArgs>
                            <jvmDebugPort>5006</jvmDebugPort>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/jira.log</output>
                        </product>
                        <product>
                            <id>ctk-server</id>
                            <version>${ctk.version}</version>
                            <output>${project.build.directory}/ctk-server.log</output>
                        </product>
                        <product>
                            <id>refapp</id>
                            <version>${refapp.version}</version>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>11.0.2-atlassian-01</version>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                    </products>
                    <systemPropertyVariables>
                        <pluginKey>${groupId}.${artifactId}</pluginKey>
                        <adminUserName>admin</adminUserName>
                        <adminPassword>admin</adminPassword>
                        <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                        <jira.websudo.is.disabled>true</jira.websudo.is.disabled>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <plugin.resource.directories>${resource.reload.dir}</plugin.resource.directories>
                        <plugin.root.directories>${plugin.reload.dir}</plugin.root.directories>
                    </systemPropertyVariables>
                    <testGroups>
                        <testGroup>
                            <id>ctk</id>
                            <productIds>
                                <productId>ctk-server</productId>
                            </productIds>
                            <includes>
                                <include>it/**/ctk/**/*Test.java</include>
                                <include>it/**/http/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bamboo</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/**/all/**/*Test.java</include>
                                <include>it/**/bamboo/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/all/**/*Test.java</include>
                                <include>it/**/confluence/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>fecru</id>
                            <productIds>
                                <productId>fecru</productId>
                            </productIds>
                            <includes>
                                <include>it/**/all/**/*Test.java</include>
                                <include>it/**/fecru/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>jira</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/all/**/*Test.java</include>
                                <include>it/**/jira/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confjira</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/confjira/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>multiapp</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>jira</productId>
                                <productId>bamboo</productId>
                                <productId>fecru</productId>
                            </productIds>
                            <includes>
                                <include>it/**/multiapp/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>api-check</id>
                            <productIds>
                                <productId>confluence-old-api</productId>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/confjira/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>refapp-customapps</id>
                            <productIds>
                                <productId>refapp</productId>
                            </productIds>
                            <systemProperties>
                                <testedProductClass>com.atlassian.webdriver.refapp.RefappTestedProduct
                                </testedProductClass>
                            </systemProperties>
                            <includes>
                                <include>it/com/atlassian/plugins/custom_apps/**/Test*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence-customapps</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <systemProperties>
                                <testedProductClass>com.atlassian.confluence.pageobjects.ConfluenceTestedProduct
                                </testedProductClass>
                            </systemProperties>
                            <includes>
                                <include>it/com/atlassian/plugins/custom_apps/**/Test*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>jira-customapps</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <systemProperties>
                                <testedProductClass>com.atlassian.jira.pageobjects.JiraTestedProduct
                                </testedProductClass>
                            </systemProperties>
                            <includes>
                                <include>it/com/atlassian/plugins/custom_apps/**/Test*.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <plugin.reload.dir>${basedir}</plugin.reload.dir>
        <resource.reload.dir>${basedir}/${main.resources}</resource.reload.dir>
        <empty.resource.dir>${basedir}/${test.resources}/emptyresourcedir</empty.resource.dir>
    </properties>


    <profiles>
        <profile>
            <id>integration-test</id>
            <properties>
                <!-- Get rid of all the magic reloading - no good for CI testing -->
                <plugin.reload.dir>${empty.resource.dir}</plugin.reload.dir>
                <resource.reload.dir>${empty.resource.dir}</resource.reload.dir>
                <use.amps.devtools>false</use.amps.devtools>
                <atlassian.dev.mode>false</atlassian.dev.mode>
            </properties>
        </profile>
    </profiles>

</project>
