<?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">

    <parent>
        <artifactId>custom-favicon-plugin-parent</artifactId>
        <groupId>com.atlassian.favicon</groupId>
        <version>1.1.6</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>confluence-custom-favicon-plugin</artifactId>

    <name>Confluence Custom Favicon Plugin</name>
    <description>This is the Atlassian Custom Favicon plugin for Confluence.</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.favicon</groupId>
            <artifactId>custom-favicon-api</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.7.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jclarion</groupId>
            <artifactId>image4j</artifactId>
            <version>0.7</version>
            <scope>compile</scope>
        </dependency>

        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${confluence.version}</productVersion>
                    <productDataVersion>${confluence.data.version}</productDataVersion>
                    <output>${project.build.directory}/output.log</output>
                    <server>tomcat7x</server>
                    <jvmArgs>-Xmx1g</jvmArgs>
                    <systemPropertyVariables>
                        <!-- This sets a system property required by the Functest RPC plugin to run in this environment -->
                        <confluence.version>${confluence.version}</confluence.version>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <xvfb.display>${xvfb.display}</xvfb.display>
                        <http.port>${http.confluence.port}</http.port>
                        <baseurl.confluence>${baseurl.confluence}</baseurl.confluence>
                        <context.path>${context.confluence.path}</context.path>
                    </systemPropertyVariables>
                    <instructions>
                        <Import-Package>
                            com.atlassian.confluence.content.service.comment,
                            com.atlassian.confluence.content.service,
                            com.atlassian.confluence.core;resolution:="optional",
                            com.atlassian.confluence.event.events.types;resolution:="optional",
                            com.atlassian.confluence.pages;resolution:="mandatory",
                            com.atlassian.confluence.plugins.ia.service,
                            com.atlassian.confluence.setup.settings;resolution:="mandatory",
                            com.atlassian.confluence.themes.events;resolution:="optional",
                            com.atlassian.core.util.thumbnail;version="${atlassian-core.version}",
                            com.atlassian.event.api;resolution:="mandatory",
                            com.atlassian.fugue;version="${fugue.version}",
                            com.atlassian.plugin;resolution:="optional",
                            com.atlassian.plugin.osgi.bridge.external,
                            com.atlassian.plugin.servlet;resolution:="optional",
                            com.atlassian.plugin.web;resolution:="optional",
                            com.atlassian.sal.api.pluginsettings;version="2.0.0",
                            com.atlassian.sal.api.transaction;version="2.0.0",
                            com.atlassian.sal.api.user;version="2.0.0",
                            com.atlassian.sal.api;version="2.0.0",
                            com.atlassian.xwork,
                            com.google.common.base;version="${guava.version}",
                            com.google.common.collect;version="${guava.version}",
                            javax.annotation;resolution:="optional",
                            javax.imageio;resolution:="optional",
                            javax.imageio.stream;resolution:="optional",
                            javax.inject;resolution:="optional",
                            javax.naming,
                            javax.servlet;resolution:="optional",
                            javax.servlet.http;resolution:="optional",
                            javax.transaction,
                            net.sf.hibernate.cache,
                            net.sf.hibernate.exception,
                            net.sf.hibernate.metadata,
                            net.sf.hibernate.connection,
                            net.sf.hibernate.engine,
                            net.sf.hibernate.type,
                            net.sf.hibernate,
                            net.sf.hibernate.collection,
                            net.sf.hibernate.dialect,
                            net.sf.hibernate.persister,
                            org.apache.commons.io;resolution:="optional",
                            org.slf4j;resolution:="optional",
                            org.springframework.beans.factory,
                            org.springframework.beans.factory.annotation,
                            sun.misc;resolution:="optional"
                        </Import-Package>
                        <Export-Package>com.atlassian.favicon.*</Export-Package>
                        <Spring-Context>*</Spring-Context>
                        <Atlassian-Plugin-Key>com.atlassian.favicon.confluence-custom-favicon-plugin</Atlassian-Plugin-Key>
                    </instructions>
                    <libArtifacts>
                        <libArtifact>
                            <groupId>com.atlassian.favicon</groupId>
                            <artifactId>custom-favicon-api</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>org.jclarion</groupId>
                            <artifactId>image4j</artifactId>
                            <version>0.7</version>
                        </libArtifact>
                    </libArtifacts>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <xvfb.enable>false</xvfb.enable>
        <xvfb.display>:0</xvfb.display>
        <http.port>1990</http.port>
        <http.confluence.port>${http.port}</http.confluence.port>
        <context.confluence.path>confluence</context.confluence.path>
        <baseurl.confluence>http://localhost:${http.confluence.port}/${context.confluence.path}</baseurl.confluence>
    </properties>

</project>
