<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>6.3.13</version>
    </parent>

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

    <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>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.2.2</version>
                </plugin>
                <plugin>
                    <groupId>org.twdata.maven</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>1.0-beta-2-db2</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>pseudo-loc-maven-plugin</artifactId>
                    <version>1.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <excludes>
                        <exclude>**/*$*</exclude>
                        <exclude>it/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <containerId>tomcat7x</containerId>
                    <enableFastdev>${enable.fastdev}</enableFastdev>
                    <systemPropertyVariables>
                        <atlassian.dev.mode>${ka.devmode}</atlassian.dev.mode>
                        <jira.websudo.is.disabled>true</jira.websudo.is.disabled>
                        <atlassian.mail.senddisabled>true</atlassian.mail.senddisabled>
                        <atlassian.mail.fetchdisabled>true</atlassian.mail.fetchdisabled>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <webdriver.browser>${webdriver.browser}</webdriver.browser>
                        <jira.qunit.testoutput.location>${project.build.directory}/surefire-reports</jira.qunit.testoutput.location>
                    </systemPropertyVariables>
                    <skipITs>${skipITs}</skipITs>
                    <jvmArgs>${ka.jvmArgs}</jvmArgs>
                    <skipManifestValidation>true</skipManifestValidation>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.data.version}</productDataVersion>
                    <compressResources>false</compressResources> <!-- we do our own minification using a newer version of yuicompressor-->
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian</groupId>
                            <artifactId>atl-docco</artifactId>
                            <version>0.11</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.qunit</groupId>
                            <artifactId>atlassian-qunit-plugin</artifactId>
                            <version>${atlassian.qunit.plugin.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-func-test-plugin</artifactId>
                            <version>${jira.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-webdriver-tests</artifactId>
                            <version>${jira.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira.tests</groupId>
                            <artifactId>jira-testkit-plugin</artifactId>
                            <version>${testkit.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-issue-nav-components</artifactId>
                            <version>${project.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <pluginDependencies>
                        <pluginDependency>
                            <groupId>com.atlassian.jira</groupId>
                            <artifactId>jira-issue-nav-components</artifactId>
                        </pluginDependency>
                    </pluginDependencies>
                    <instructions>
                        <Atlassian-Plugin-Key>${groupId}.${artifactId}</Atlassian-Plugin-Key>
                        <Import-Package>
                            org.springframework.beans*;version="2.5",
                            org.springframework.context*;version="2.5",
                            org.springframework.stereotype*;version="2.5",
                            org.springframework.util*;version="2.5",
                            *;resolution:=optional
                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
            <plugin> <!-- until AMPS uses a newer version of yuicompressor, do compression ourselves -->
              <groupId>net.alchim31.maven</groupId>
              <artifactId>yuicompressor-maven-plugin</artifactId>
              <version>1.3.0</version>
                <dependencies>
                    <dependency> <!-- upgrade yui lib from 2.4.6 to 2.4.7, since 1.3.0 contains 2.4.6 which has a regex stack-overflow -->
                        <groupId>com.yahoo.platform.yui</groupId>
                        <artifactId>yuicompressor</artifactId>
                        <version>2.4.7</version>
                    </dependency>
                </dependencies>
                <executions>
                  <execution>
                    <goals>
                      <goal>compress</goal>
                    </goals>
                  </execution>
                </executions>
                <configuration>
                    <jswarn>false</jswarn>
                    <suffix>-min</suffix>
                    <linebreakpos>-1</linebreakpos>
                    <nomunge>false</nomunge>
                    <disableOptimizations>false</disableOptimizations>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>attach-bundle-artifact</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                                    <type>jar</type>
                                </artifact>
                             </artifacts>
                         </configuration>
                    </execution>
               </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile> <!-- Used for snapshots so we don't have caching problems and know which git revision was used -->
            <id>stamp</id>
            <activation>
                <property>
                    <name>!skipCommitIdStamp</name>
                </property>
            </activation>
            <properties>
                <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
                <!-- place the revision and build date in the plugin description -->
                <atlassian-plugin.description>${project.description} (rev: ${git.commit.id.abbrev}, date: ${maven.build.timestamp})</atlassian-plugin.description>
            </properties>
            <build>
                <plugins>
					<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <version>1.2</version>
		                <executions>
		                    <execution>
                                <phase>validate</phase>
		                        <goals>
                                    <goal>create</goal>
                                    <goal>create-timestamp</goal>
		                        </goals>
		                    </execution>
		                </executions>
                        <configuration>
                            <!-- set the Git commit id -->
                            <buildNumberPropertyName>git.commit.id.abbrev</buildNumberPropertyName>
                            <shortRevisionLength>7</shortRevisionLength>
                            <revisionOnScmFailure>unknown</revisionOnScmFailure>

                            <!-- also set the build timestamp -->
                            <timestampFormat>yyyy-MM-dd'T'HH:mm:ssZ</timestampFormat>
                            <timestampPropertyName>maven.build.timestamp</timestampPropertyName>
                        </configuration>
		            </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>pseudo-loc</id>
            <activation>
                <property>
                    <name>jira.acceptance.tests</name>
                    <value>!true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>pseudo-loc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pseudo-loc</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>pseudo-loc</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <sourceLocale>en_UK</sourceLocale>
                            <targetLocale>en_AQ</targetLocale>
                            <pseudoLocaliseActions>
                                <pseudoLocaliseAction>
                                    <source>src/main/resources/i18n/i18n.properties</source>
                                    <target>src/main/resources/i18n/i18n_{loc}.properties</target>
                                </pseudoLocaliseAction>
                            </pseudoLocaliseActions>
                        </configuration>
		            </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>hallelujahServer</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.1.1</version>
                        <executions>
                            <execution>
                                <phase>test</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <mainClass>com.atlassian.jira.plugin.issuenav.hallelujah.KickAssHallelujahServer</mainClass>
                                    <classpathScope>test</classpathScope>
                                    <systemProperties>
                                        <systemProperty>
                                            <key>atlassian.test.suite.package</key>
                                            <value>${atlassian.test.suite.package}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>atlassian.test.suite.includes</key>
                                            <value>${atlassian.test.suite.includes}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>atlassian.test.suite.excludes</key>
                                            <value>${atlassian.test.suite.excludes}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>atlassian.test.run.only.quarantined</key>
                                            <value>${atlassian.test.run.only.quarantined}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>atlassian.test.target.dir</key>
                                            <value>${atlassian.test.target.dir}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>jira.functest.single.testclass</key>
                                            <value>${jira.functest.single.testclass}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>jira.hallelujah.queueId</key>
                                            <value>${jira.hallelujah.queueId}</value>
                                        </systemProperty>
                                        <systemProperty>
                                            <key>jira.qunit.testoutput.location</key>
                                            <value>${project.build.directory}/surefire-reports</value>
                                        </systemProperty>
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <skipTests>true</skipTests>
            </properties>
        </profile>

        <profile>
            <id>runIndividualTestSuite</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <products>
                                <product>
                                    <id>jira</id>
                                    <version>${jira.version}</version>
                                    <dataVersion>${jira.data.version}</dataVersion>
                                </product>
                            </products>

                            <testGroups>
                                <testGroup>
                                    <id>runFuncTest</id>
                                    <includes>
                                        <include>**/it/com/atlassian/jira/plugin/issuenav/func/**</include>
                                    </includes>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                </testGroup>
                                <testGroup>
                                    <id>runWebDriverTest</id>
                                    <includes>
                                        <include>**/it/com/atlassian/jira/plugin/issuenav/webdriver/**</include>
                                    </includes>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                </testGroup>
                                <testGroup>
                                    <id>runVisualRegressionTest</id>
                                    <includes>
                                        <include>**/it/com/atlassian/jira/plugin/issuenav/webdriver/visualregressions/**</include>
                                    </includes>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                </testGroup>
                                <testGroup>
                                    <id>runQunitTest</id>
                                    <includes>
                                        <include>**/it/com/atlassian/jira/plugin/issuenav/qunit/*</include>
                                    </includes>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                </testGroup>
                            </testGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>hallelujahClient</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <products>
                                <product>
                                    <id>jira</id>
                                    <version>${jira.version}</version>
                                    <dataVersion>${jira.data.version}</dataVersion>
                                </product>
                            </products>

                            <testGroups>
                                <testGroup>
                                    <id>hallelujahClient</id>
                                    <includes>
                                        <include>**/KickAssHallelujahClient.java</include>
                                    </includes>
                                    <productIds>
                                        <productId>jira</productId>
                                    </productIds>
                                </testGroup>
                            </testGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <testGroups>hallelujahClient</testGroups>
            </properties>
        </profile>
        <profile>
            <id>run-with-fastdev</id>
            <activation>
                <property>
                    <name>ilovefastdev</name>
                </property>
            </activation>
            <properties>
                <enable.fastdev>true</enable.fastdev>
            </properties>
        </profile>
        <profile>
            <!-- use different settings when running in Bamboo (no dev is present) -->
            <id>no-dev-mode</id>
            <activation>
                <property>
                    <name>noDevMode</name>
                </property>
            </activation>
            <properties>
                <ka.devmode>false</ka.devmode>
            </properties>
        </profile>
    </profiles>

    <dependencies>

        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-issue-nav-components</artifactId>
            <version>${project.version}</version>
            <scope>provided</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-rest-api</artifactId>
            <version>${jira.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>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>
            <version>${analytics.api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>${rest.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- needed by selenium client, but somehow not pulled in by jira-pageobjects -->
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.qunit</groupId>
            <artifactId>atlassian-qunit-plugin-util</artifactId>
            <version>${atlassian.qunit.plugin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>ka-func-test-framework</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- jira-testkit-client is required by nimble-func-tests -->
        <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>

        <!-- This section is needed to upgrade to the latest Firefox for web-driver tests -->
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <version>${webdriver.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-selenium</artifactId>
            <version>${webdriver.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- End of firefox upgrade section -->

        <dependency>
            <groupId>com.atlassian.buildeng.hallelujah</groupId>
            <artifactId>server</artifactId>
            <version>${hallelujah.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-grizzly</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.buildeng.hallelujah</groupId>
            <artifactId>client</artifactId>
            <version>${hallelujah.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-grizzly</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.4</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-processor</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-runtime</artifactId>
        </dependency>

    </dependencies>


</project>
