<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>
        <artifactId>jira-issue-nav-plugin-parent</artifactId>
        <groupId>com.atlassian.jira</groupId>
        <version>2.0.20.1</version>
    </parent>
    <artifactId>ka-performance-test</artifactId>
    <name>KA Performance Test</name>
    <description>Performance Tests for the Issue Search and Inline Edit plugin</description>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.soke</groupId>
            <artifactId>soke-client</artifactId>
            <version>2.3.0-M3</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>ka-func-test-framework</artifactId>
            <version>${pom.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.9.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>jline</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId>
        </dependency>

        <!-- override ka-functests version due to incompatability with selenium -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.2.1-atlassian-5</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <!-- Compile things into a JAR that we can run. In order to get the manifest-based classpath to work on Windows (having
                whitespaces in directory names), we're copying all dependencies into target/lib and reference that from the JAR. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                        </manifest>
                    </archive>
                    <finalName>soke-issue-nav-plugin</finalName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <version>2.13.1</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <excludes>
                        <exclude>**/*$*</exclude>
                        <exclude>it/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>update-test-service</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>${pom.basedir}/src/main/gmaven/updateKickassVersion.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <soke.version>2.3.0-M3</soke.version>
        <atlassian-selenium-version>2.1-m18</atlassian-selenium-version>
        <testkit.version>5.2-m26</testkit.version>
    </properties>
    <profiles>
        <profile> <!-- Used for snapshots so we don't have caching problems and know which git revision was used -->
            <id>stamp</id>
            <properties>
                <maven.build.timestamp.format>yyMMddHHmm</maven.build.timestamp.format>
                <atlassian-plugin.version>${project.version}.${maven.build.timestamp}</atlassian-plugin.version>
                <atlassian-plugin.description>${project.description} (rev: ${git.commit.id.abbrev})</atlassian-plugin.description>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>pl.project13.maven</groupId>
                        <artifactId>git-commit-id-plugin</artifactId>
                        <version>2.0.2</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>revision</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>download-test-data</id>
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.jira</groupId>
                    <artifactId>jira-issue-nav-plugin-test-data</artifactId>
                    <version>1.1</version>
                    <type>zip</type>
                    <classifier>big</classifier>
                </dependency>
                <dependency>
                    <groupId>com.atlassian.jira</groupId>
                    <artifactId>jira-issue-nav-plugin-test-data</artifactId>
                    <version>1.1</version>
                    <type>zip</type>
                    <classifier>small</classifier>
                </dependency>
            </dependencies>
        </profile>

        </profiles>

</project>
