<?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>9.0.6</version>
    </parent>

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

    <name>Confluence Activity Stream Plugin</name>

    <properties>
        <atlassian.user.confluence.version>3.0</atlassian.user.confluence.version>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.streams</groupId>
            <artifactId>streams-gadget-resources</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.streams</groupId>
            <artifactId>streams-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.streams</groupId>
            <artifactId>streams-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.thoughtworks.xstream</groupId>
                    <artifactId>xstream</artifactId>
                </exclusion>
                <!-- security related exclusion -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.xmlgraphics</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.ldap</groupId>
                    <artifactId>spring-ldap-core</artifactId>
                </exclusion>
            </exclusions>
        </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>com.atlassian.user</groupId>
            <artifactId>atlassian-user</artifactId>
            <version>${atlassian.user.confluence.version}</version>
            <!--$NO-MVN-MAN-VER$-->
            <exclusions>
                <!-- security related exclusion -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxp-api</artifactId>
            <version>1.4.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <!-- test dependencies -->
        <dependency>
            <groupId>com.atlassian.streams</groupId>
            <artifactId>streams-testing</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>2.0.9</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <version>2.0.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Private-Package>com.atlassian.streams.confluence*</Private-Package>
                        <Import-Package>
                            com.atlassian.bonnie.*;version="0.0.0",
                            com.atlassian.confluence*;version="0.0.0",
                            com.atlassian.confluence.api.service.network,
                            com.atlassian.hibernate*;version="0.0.0",
                            com.atlassian.core.util.thumbnail;version="0.0.0",
                            com.atlassian.renderer.*;version="1.0.11",
                            com.atlassian.plugin.*;version="2.8",
                            com.atlassian.sal.api.*;version="0.0.0",
                            com.atlassian.spring.container;version="1.1",
                            com.atlassian.streams.api*;version="${project.version}",
                            com.atlassian.streams.spi*;version="${project.version}",
                            com.atlassian.streams.formatter.*;version="${project.version}",
                            com.atlassian.streams.util.*;version="${project.version}",
                            com.atlassian.templaterenderer.*;version="1.0",
                            com.atlassian.user;version="0.0.0",
                            com.google.common.*;version="0.0.0",
                            com.opensymphony.util;version="0.0.0",
                            io.atlassian.util.concurrent*;version="0.0.0",
                            javax.servlet.*;version="3.1",
                            javax.ws.rs.*;version="1.0",
                            javax.xml.bind.annotation;version="2.1",
                            javax.xml.parsers.*;version="0.0.0",
                            javax.xml.transform.*;version="0.0.0",
                            javax.xml.xpath.*;version="0.0.0",
                            javax.xml.stream.*;version="0.0.0",
                            javax.xml.namespace.*;version="0.0.0",
                            javax.persistence.*;version="0.0.0",
                            org.apache.commons.collections.*;version="0.0.0",
                            org.apache.commons.jrcs.diff;version="0.0.0",
                            org.apache.commons.lang3*;version="0.0.0",
                            org.apache.velocity.*;version="0.0.0",
                            org.joda.time.*;version="0.0.0",
                            org.slf4j;version="0.0.0",
                            org.springframework.beans.factory.annotation;version="0.0.0",
                            org.w3c.dom.*;version="0.0.0",
                            org.xml.sax.*;version="0.0.0"
                        </Import-Package>
                        <Spring-Context>classpath:/META-INF/spring/*.xml</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <executions>
                            <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>
