<?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.oauth2</groupId>
        <artifactId>oauth2-scopes-parent</artifactId>
        <version>2.0.1</version>
    </parent>

    <artifactId>oauth2-scopes-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Atlassian OAuth 2 Scopes - Plugin</name>
    <description>Plugin for Atlassian OAuth 2 Scopes</description>

    <properties>
        <bamboo.buildKey>UNKNOWN</bamboo.buildKey>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>

    <dependencies>
        <!-- Module dependencies -->
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-scopes-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-common</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-spi</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <enableQuickReload>true</enableQuickReload>

                    <libArtifacts>
                        <libArtifact>
                            <groupId>com.atlassian.oauth2</groupId>
                            <artifactId>oauth2-scopes-api</artifactId>
                            <version>${project.version}</version>
                        </libArtifact>
                    </libArtifacts>

                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            org.springframework.osgi.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",
                            com.atlassian.analytics.api.*;resolution:="optional",
                            com.atlassian.seraph.*;resolution:="optional",
                            com.atlassian.plugins.osgi.javaconfig.*;resolution:="optional",
                            org.slf4j.*;resolution:="optional",
                            com.atlassian.jira.*;resolution:="optional",
                            com.atlassian.confluence.*;resolution:="optional",
                            com.atlassian.bitbucket.*;resolution:="optional",
                            com.atlassian.bamboo.*;resolution:="optional",
                            io.atlassian.util.concurrent*;resolution:="optional",
                            org.acegisecurity.userdetails*;resolution:="optional",
                            com.atlassian.sal.*;resolution:="optional",

                            !lombok,

                            <!-- exclude pocketknife bits we don't need -->
                            !net.sf.cglib.proxy,
                            !org.jvnet.hudson.annotation_indexer,
                            !com.google.gson.stream,
                            !com.google.crypto.tink.subtle,
                            !com.ibm.uvm.tools,
                            !com.sun.jdmk.comm,
                            !javax.jmdns,
                            !javax.jms,
                            !net.sf.ehcache,
                            !net.spy.memcached,
                            !net.shibboleth.*,
                            !org.apache.avalon.framework*,
                            !org.apache.log,
                            !org.cryptomator.*,
                            !sun.security.util,
                            !com.mysema.query.*,
                            !com.mysema.query.spatial.path,
                            !com.mysema.query.spatial,
                            !org.postgis,
                            !org.bouncycastle.*,
                            !org.opensaml.*,
                            !oracle.spatial.geometry,
                            !org.geolatte.geom,
                            !org.geolatte.geom.codec,
                            !org.geolatte.geom.crs,
                            !bsh,
                            !sun.misc,
                            !org.reflections*,
                            !com.sun.research.ws.wadl,

                            *
                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
