<?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.streams</groupId>
        <artifactId>streams-parent</artifactId>
        <version>8.1.7</version>
    </parent>

    <artifactId>streams-spi</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Streams SPI</name>
    <description>Streams SPI Plug-in</description>
    <organization>
        <url>http://www.atlassian.com/</url>
        <name>Atlassian Pty Ltd</name>
    </organization>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.streams</groupId>
            <artifactId>streams-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-velocity16-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <version>${atlassian.annotations.version}</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/atlassian-plugin.xml</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Import-Package>
                            com.atlassian.sal.api*;version="${sal.import.version}",
                            com.atlassian.plugin.*;version="2.8",
                            com.atlassian.streams.api.*;version="${project.version}",
                            com.atlassian.streams.spi.*;version="${project.version}",
                            com.atlassian.templaterenderer.*;version="1.0",
                            com.google.common.*;version="1.0",
                            org.apache.commons.lang3*;version="3.8",
                            org.dom4j.*,
                            org.joda.time.*;version="1.6",
                            org.osgi.framework;version="1.3",
                            org.osgi.util.tracker*;version="1.4.0",
                            org.slf4j;version="1.5.0",
                            org.springframework.beans*;version="2.5.2",
                            org.springframework.context.*;version="2.5.2"
                        </Import-Package>
                        <Export-Package>
                            com.atlassian.streams.spi.*;version="${project.version}",
                            com.atlassian.streams.formatter.*;version="${project.version}"
                        </Export-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-amps-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>remote-deploy-jira</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <product>jira</product>
                                    <username>admin</username>
                                    <password>admin</password>
                                    <server>${utac.server}</server>
                                    <httpPort>${utac.httpPort}</httpPort>
                                    <contextPath>${utac.jira.contextPath}</contextPath>
                                    <pluginKey>${project.groupId}.${project.artifactId}</pluginKey>
                                </configuration>
                            </execution>
                            <execution>
                                <id>remote-deploy-confluence</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <product>confluence</product>
                                    <username>admin</username>
                                    <password>admin</password>
                                    <server>${utac.server}</server>
                                    <httpPort>${utac.httpPort}</httpPort>
                                    <contextPath>${utac.confluence.contextPath}</contextPath>
                                    <pluginKey>${project.groupId}.${project.artifactId}</pluginKey>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
