<?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.integration.jira</groupId>
        <artifactId>jira-integration-parent</artifactId>
        <version>7.0.0-m5</version>
    </parent>

    <artifactId>jira-integration-plugin</artifactId>
    <name>Jira Integration :: Plugin</name>
    <packaging>atlassian-plugin</packaging>
    <description>A cross-product plugin for integrating with Jira, providing issue details and support for transitioning issues.</description>

    <properties>
        <!-- These properties define versions for controlling OSGi imports. The versions here may not match the
             versions of the dependencies against which this plugin is compiled. -->
        <jackson.osgi.version>1.9</jackson.osgi.version>
        <jax-rs.osgi.version>1.1</jax-rs.osgi.version>
        <rest.osgi.version>2.0.0</rest.osgi.version>
        <sal.osgi.version>2.0.0</sal.osgi.version>
        <slf4j.osgi.version>1.6</slf4j.osgi.version>
        <ual.osgi.version>5.0.0</ual.osgi.version>
        <!--
            we can use an older servlet api version, even though we are compiling
            against a newer version (we don't use any of those new features). This makes
            the plugin runnable in both pre-plugins 4 products as well as plugins 4 products.
        -->
        <servlet.api.osgi.version>2.5</servlet.api.osgi.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            com.atlassian.integration.jira;version="${project.version}",
                            com.atlassian.integration.jira.applinks;version="${project.version}"
                        </Export-Package>
                        <!-- The com.atlassian.integration.jira.applinks package is imported as well as exported to
                             allow it to come from the host application instead. -->
                        <Import-Package>
                            com.atlassian.integration.jira.applinks,
                            com.atlassian.applinks.api*,
                            com.atlassian.plugins.rest*,
                            com.atlassian.sal.api*,
                            com.atlassian.bitbucket.server;resolution:="optional";version="${bitbucket.osgi.version}",
                            com.atlassian.util.profiling,
                            com.google.common.*,
                            io.atlassian.fugue,
                            javax.annotation,
                            javax.servlet*;version="${servlet.api.osgi.version}",
                            javax.ws.rs*;version="${jax-rs.osgi.version}",
                            org.apache.commons.io*,
                            org.apache.commons.lang3,
                            org.codehaus.jackson*;version="${jackson.osgi.version}",
                            org.slf4j;version="${slf4j.osgi.version}",
                            org.springframework.beans.factory.annotation,
                        </Import-Package>
                        <Private-Package>
                            com.atlassian.internal*
                        </Private-Package>
                    </instructions>
                    <products>
                        <product>
                            <id>jira</id>
                            <version>${jira.version}</version>
                        </product>
                        <product>
                            <id>confluence</id>
                            <version>${confluence.version}</version>
                        </product>
                        <product>
                            <id>fecru</id>
                            <version>${fecru.version}</version>
                        </product>
                        <product>
                            <id>bamboo</id>
                            <version>${bamboo.version}</version>
                        </product>
                        <product>
                            <id>refapp</id>
                            <version>${refapp.version}</version>
                        </product>
                        <product>
                            <id>bitbucket</id>
                            <version>${bitbucket.version}</version>
                        </product>
                    </products>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.lesscss</groupId>
                <artifactId>lesscss-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-less</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.integration.jira</groupId>
            <artifactId>jira-integration-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.integration.jira</groupId>
            <artifactId>jira-integration-spi</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</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.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.profiling</groupId>
            <artifactId>atlassian-profiling</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>issue-status-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
