<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.jira</groupId>
        <artifactId>jira-issue-nav-plugin-parent</artifactId>
        <version>10.0.9</version>
    </parent>

    <name>Atlassian Jira - Plugins - Global Issue Navigator</name>
    <artifactId>jira-issue-nav-plugin</artifactId>
    <description>Provides issue search and navigation</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-issue-nav-components</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.17.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-plugin</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-webdriver-tests</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</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.audit</groupId>
            <artifactId>atlassian-audit-api</artifactId>
            <version>${atlassian.audit.api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>ka-func-test-framework</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-nimble-func-tests</artifactId>
            <version>0.2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-func-tests-legacy</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <includes>
                    <include>localtest.properties</include>
                    <include>seleniumtest.properties</include>
                </includes>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <excludes>
                    <exclude>localtest.properties</exclude>
                    <exclude>seleniumtest.properties</exclude>
                </excludes>
                <filtering>false</filtering>
            </testResource>
            <testResource>
                <directory>src/test/xml</directory>
                <targetPath>xml</targetPath>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <scannedDependencies>
                        <dependency>
                            <groupId>com.atlassian.plugin</groupId>
                            <artifactId>atlassian-spring-scanner-test-example-external-jar</artifactId>
                            <!--
                                        For testing reasons we exclude the transitive dep (atlassian-spring-scanner-test-example-transitive-excluded-jar) but there
                                        is another one (atlassian-spring-scanner-test-example-transitive-jar) in play.

                                        We should see the @Components from atlassian-spring-scanner-test-example-transitive-jar
                                        but not from atlassian-spring-scanner-test-example-transitive-excluded-jar
                               -->
                            <exclusions>
                                <exclusion>
                                    <groupId>com.atlassian.plugin</groupId>
                                    <artifactId>atlassian-spring-scanner-test-example-transitive-excluded-jar</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                    </scannedDependencies>
                    <verbose>true</verbose>
                    <!-- We are explicitly scanning an external JAR above for this test case, which will
                         never happen in real life but which is apparently needed to test the transitive
                         deps, so we permit duplicate imports here.
                      -->
                    <permitDuplicateImports>true</permitDuplicateImports>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>jira-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <systemPropertyVariables>
                        <atlassian.darkfeature.never.display.newsletter.prompts>true</atlassian.darkfeature.never.display.newsletter.prompts>
                    </systemPropertyVariables>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Import-Package>
                            com.atlassian.jira.*;resolution:="optional",
                            com.atlassian.sal.api*;resolution:=optional,
                            com.atlassian.audit.api,
                            org.springframework.*,
                            *
                        </Import-Package>
                        <Export-Package>
                            com.atlassian.jira.plugin.issuenav.rest,
                            com.atlassian.jira.plugin.issuenav.service,
                            com.atlassian.jira.plugin.issuenav.service.issuetable
                        </Export-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-issue-nav-components</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-projects-issue-navigator</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-func-test-plugin</artifactId>
                            <version>${jira.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <additionalResourceFolders>${resourcedir.issuenav.components},${resourcedir.projectcentric.issuenav.plugin}</additionalResourceFolders>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <resourcedir.issuenav.components>${basedir}/../jira-issue-navigator-components-plugin/src/main/resources</resourcedir.issuenav.components>
        <resourcedir.projectcentric.issuenav.plugin>${basedir}/../jira-projects-issue-navigator-plugin/src/main/resources</resourcedir.projectcentric.issuenav.plugin>
    </properties>
</project>
