<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.jira.plugins</groupId>
        <artifactId>atlassian-jira-rpc-parent</artifactId>
        <version>6.0-m06</version>
    </parent>

    <groupId>com.atlassian.jira.plugins</groupId>
    <artifactId>atlassian-jira-rpc-plugin-func-tests</artifactId>
    <name>JIRA RPC - Func Tests</name>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/xml</directory>
                <targetPath>xml</targetPath>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>3.4</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>run-integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                        <phase>integration-test</phase>
                    </execution>
                </executions>
                <configuration>
                    <skipManifestValidation>true</skipManifestValidation>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.data.version}</productDataVersion>
                    <jvmArgs>-Xmx768m -XX:MaxPermSize=512m -Duser.language=en -Duser.region=AU -Djira.websudo.is.disabled=true</jvmArgs>
                    <installPlugin>false</installPlugin>
                    <bundledArtifactsString>com.atlassian.jira.plugins:atlassian-jira-rpc-plugin:${project.version}</bundledArtifactsString>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xmx512m -Dfile.encoding=ISO-8859-1 -Duser.language=en -Duser.region=AU</argLine>
                    <skip>${maven.test.unit.skip}</skip>
                    <excludes>
                        <exclude>it/**/*</exclude>
                        <exclude>**/Abstract*</exclude>
                        <exclude>**/Mock*</exclude>
                        <exclude>**/*$*</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <classesDirectory>${project.build.testOutputDirectory}</classesDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>bootstrap-nightly</id>
            <properties>
                <functional.test.pattern>it/**/BootstrapJIRAEnableRPC*</functional.test.pattern>
                <http.port>9090</http.port>
                <no.webapp>true</no.webapp>
                <context.path>/atlassian-jira</context.path>
            </properties>
        </profile>
        <profile>
            <id>nightly</id>
            <properties>
                <http.port>9090</http.port>
                <no.webapp>true</no.webapp>
                <context.path>/atlassian-jira</context.path>
            </properties>
        </profile>
    </profiles>    

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-func-tests</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>com.atlassian.jira.tests</groupId>
			<artifactId>jira-testkit-client</artifactId>
			<version>${testkit.version}</version>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-soapclient</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>1.3.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.collections</groupId>
            <artifactId>google-collections</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.0.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
</project>
