<?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.oauth</groupId>
        <artifactId>atlassian-oauth</artifactId>
        <version>6.0.0-m01</version>
    </parent>

    <artifactId>atlassian-oauth-service-provider-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Atlassian OAuth Service Provider Plugin</name>
    <description>Plugin that makes it possible for applications to become Service Providers.</description>

    <properties>
        <atlassian.plugin.key>com.atlassian.oauth.serviceprovider</atlassian.plugin.key>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>

        <confluence.version>7.4.10</confluence.version>
        <jira.version>8.10.0</jira.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <configuration>
                    <jvmArgs>${jacoco.agent.it.argLine}</jvmArgs>
                    <!-- These are provided by OAuth, this prevents the enforcer plugin from failing the build as they are compile scope.
                         To make these provided would be a breaking change and needs to be done alongside the products.
                    -->
                    <banningExcludes>
                        <exclude>com.atlassian.oauth:atlassian-oauth-bridge</exclude>
                    </banningExcludes>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            <!-- Required to run other products besides Confluence as we pull in the confluence dependency but don't always require it -->
                            com.atlassian.confluence*;resolution:="optional",
                            com.atlassian.jira*;resolution:="optional",
                            com.opensymphony.xwork*;resolution:="optional",
                            com.atlassian.xwork*;resolution:="optional",
                            com.atlassian.oauth2*;resolution:="optional",

                            *
                        </Import-Package>
                    </instructions>
                    <libArtifacts>
                        <libArtifact>
                            <groupId>com.atlassian.oauth2</groupId>
                            <artifactId>oauth2-provider-api</artifactId>
                            <version>${atlassian.oauth2.version}</version>
                        </libArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.oauth2</groupId>
                            <artifactId>oauth2-scopes-api</artifactId>
                            <version>${atlassian.oauth2.version}</version>
                        </libArtifact>
                    </libArtifacts>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.oauth2</groupId>
                            <artifactId>oauth2-provider-plugin</artifactId>
                            <version>${atlassian.oauth2.version}</version>
                        </pluginArtifact>
                        <libArtifact>
                            <groupId>com.atlassian.oauth2</groupId>
                            <artifactId>oauth2-scopes-plugin</artifactId>
                            <version>${atlassian.oauth2.version}</version>
                        </libArtifact>
                    </pluginArtifacts>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-oauth-service-provider-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-oauth-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-oauth-shared</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-provider-api</artifactId>
            <version>${atlassian.oauth2.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-scopes-api</artifactId>
            <version>${atlassian.oauth2.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth-provider</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-oauth-bridge</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-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.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.10.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</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.atlassian.bonnie</groupId>
                    <artifactId>atlassian-bonnie</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.datatype</groupId>
                    <artifactId>jackson-datatype-joda</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-oauth-test-utils</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-scopes-plugin</artifactId>
            <version>${atlassian.oauth2.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bonnie</groupId>
            <artifactId>atlassian-bonnie</artifactId>
            <version>8.2.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
