<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-plugins</artifactId>
        <version>9.9.0-QR-20230519113821</version>
    </parent>

    <artifactId>jira-oauth-consumer-spi-plugin</artifactId>
    <packaging>bundle</packaging>

    <name>Atlassian Jira - Plugins - OAuth Consumer SPI</name>
    <description>Provides the Consumer SPI implementation required for OAuth in Jira.</description>

    <properties>
        <atlassian.plugin.key>com.atlassian.jira.oauth.consumer</atlassian.plugin.key>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</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>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Bundle-SymbolicName>${atlassian.plugin.key}</Bundle-SymbolicName>
                        <Embed-Dependency>atlassian-plugins-osgi-javaconfig</Embed-Dependency>
                        <Private-Package>com.atlassian.jira.oauth.consumer.*,
                            com.atlassian.oauth.consumer.core.*,
                            com.atlassian.oauth.bridge.*,
                            com.atlassian.oauth.shared.*
                        </Private-Package>
                        <Export-Package>
                            <!--

                             Actually we have 20100601-atlassian-X version of net.oauth, but due to different interpretation non-semver versions
                             I'm trimming -atlassian-X suffix leaving date as the sole version identifier

                             If you are curious why, here are blogposts scratching this surface:
                             https://extranet.atlassian.com/pages/viewpage.action?pageId=2226340658
                             https://hello.atlassian.net/l/cp/sDKP6a5b
                             -->
                            net.oauth.*;version=20100601<!--atlassian-X-->
                        </Export-Package>
                        <Import-Package>*</Import-Package>
                        <!-- Ensure plugin is spring powered - see https://extranet.atlassian.com/x/xBS9hQ -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
