<?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>
        <artifactId>jira-software-application-parent</artifactId>
        <groupId>com.atlassian.jira</groupId>
        <version>7.1.0</version>
    </parent>

    <artifactId>jira-software-application</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>JIRA Software Application</name>
    <description>Gathers pieces of JIRA Software together.</description>

    <properties>
        <skipITs>true</skipITs>
        <od.testing.configuration>
                        use-java,8
                        use-maven,3
        </od.testing.configuration>
        <maven.test.unit.skip>false</maven.test.unit.skip>
    </properties>

    <dependencies>
        <!--
            The following test dependency is deliberately moved to the very top of the dependency list.
            it.com.atalassian.jsa.plugin.TestJSAEnabled started failing with java.lang.NoSuchMethodError: org.apache.http.impl.client.cache.CacheConfig.setNeverCache1_0ResponsesWithQueryString(Z)V
            and it seems to be caused by some sort of dependency conflict / ordering issue which seems to be
            rectified after moving this dependency to the top of the list.
         -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-software-monitor-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-software-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-greenhopper-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-development-integration-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-fisheye-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-bamboo-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-dvcs-connector-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-transition-triggers-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-test-categories</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>docsversion-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>set-docs-version-property</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>set-property</goal>
                        </goals>
                        <configuration>
                            <property>docs.version</property>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <pluginDependencies>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-software-monitor-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-software-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-greenhopper-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-development-integration-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-bamboo-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-fisheye-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-dvcs-connector-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.jira.plugins</groupId>
                            <artifactId>jira-transition-triggers-plugin</artifactId>
                        </pluginDependency>
                    </pluginDependencies>

                    <instructions>
                        <Require-Bundle>
                            com.atlassian.jira.plugins.jira-software-monitor-plugin;bundle-version=${jira.software.monitor.osgi.min.version}
                        </Require-Bundle>
                        <Import-Package>
                            com.atlassian.jira.software.internal.obr.install,
                            com.atlassian.greenhopper.obr.install,
                            com.atlassian.jira.plugin.triggers.obr.install,
                            com.atlassian.jirafisheyeplugin.obr.install,
                            com.atlassian.jira.plugin.ext.bamboo.obr.install,
                            com.atlassian.jira.plugins.dvcs.obr.install,
                            com.atlassian.jira.plugin.devstatus.obr.install
                        </Import-Package>
                    </instructions>
                    <skipUTs>${maven.test.unit.skip}</skipUTs>
                </configuration>
            </plugin>
            <!-- Build test JAR for AT/SLAT execution -->
            <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>
            <id>ondemand-acceptance-tests</id>
            <properties>
                <skipITs>false</skipITs>
                <maven.test.unit.skip>true</maven.test.unit.skip>
            </properties>
        </profile>
    </profiles>
</project>
