<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.security</groupId>
        <artifactId>atlassian-security</artifactId>
        <version>7.0.4</version>
    </parent>

    <artifactId>atlassian-secure-csp-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>
    <name>Atlassian Secure CSP Plugin</name>
    <description>CSP Plugin for DC products</description>

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

    <dependencies>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
            <scope>compile</scope>
            <version>0.6.0</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-internal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security</groupId>
            <artifactId>atlassian-secure-random</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Atlassian dependencies -->
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Third party platform dependencies -->
        <dependency>
            <groupId>com.atlassian.spring</groupId>
            <artifactId>atlassian-spring</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- PLEASE DO NOT REMOVE , compile scope is needed to ensure this plugin separate log4j configuration -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4jv2.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>static-assets-url-api</artifactId>
            <version>${static-assets-plugin.version}</version> <!-- Remove this version once platform gets it-->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4jv2.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
            <version>${jakarta.servlet.api}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <!-- runtime won't work, it needs to be on the classpath during process-classes -->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <scope>provided</scope>
            <version>${osgi.version}</version>
        </dependency>
        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</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>
                    <extractDependencies>false</extractDependencies>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            !com.conversantmedia.util.concurrent*,
                            !com.lmax.disruptor*,
                            !javax.activation*,
                            !javax.jms*,
                            !javax.mail*,
                            !org.apache.commons.compress*,
                            !com.github.luben.zstd*,
                            !org.apache.commons.csv*,
                            !org.apache.kafka*,
                            !org.brotli.dec*,
                            !org.codehaus.stax2*,
                            !org.fusesource.jansi*,
                            !org.jctools.queues*,
                            !org.tukaani.xz*,
                            !org.zeromq*,
                            org.apache.logging.log4j.util.internal.*;resolution:=optional,
                            *
                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
