<?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.gadgets</groupId>
        <artifactId>atlassian-gadgets</artifactId>
        <version>11.0.0</version>
    </parent>

    <artifactId>atlassian-gadgets-directory-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Gadget Directory Plugin</name>
    <description>Plugin which renders a directory of gadgets</description>

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

    <dependencies>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</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>

        <!-- Compile-time, bundled dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-shared</artifactId>
        </dependency>

        <!-- Provided, non-bundled dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.event</groupId>
            <artifactId>atlassian-event</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webfragment-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-whitelist-api-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform internal-api -->
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform internal-api -->
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform internal-api -->
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5-cache</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- provided by platform public-api -->
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency><!-- used by Shindig, but also provided by platform-public-api -->
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.rometools</groupId>
            <artifactId>rome</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test-only dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-gadgets-test-framework</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${spring-scanner.version}</version>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>refapp-maven-plugin</artifactId>
                <configuration>
                    <compressCss>false</compressCss>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Bundle-SymbolicName>${atlassian.plugin.key}</Bundle-SymbolicName>
                        <Spring-Context>*</Spring-Context>
                        <Import-Package>
                            com.atlassian.gadgets.*;version="${project.version}",
                            com.atlassian.templaterenderer,
                            !sun.misc*,
                            *
                        </Import-Package>
                        <Export-Package />
                        <Require-Bundle>
                            com.atlassian.gadgets.publisher,
                            com.atlassian.gadgets.opensocial
                        </Require-Bundle>
                    </instructions>
                    <skipManifestValidation>true</skipManifestValidation>
                    <includedFeModuleManifests>
                        <includedFeModuleManifest>${project.basedir}/package.json</includedFeModuleManifest>
                        <includedFeModuleManifest>${project.basedir}/yarn.lock</includedFeModuleManifest>
                    </includedFeModuleManifests>
                    <feManifestAssociations>
                        <feManifestAssociation>
                            <packageName>@atlassian/dc.atlassian-gadgets.directory-plugin</packageName>
                            <manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                                <outputDirectoryFiles>
                                    js/gadget-directory-admin.js,
                                    js/gadget-directory-admin-min.js,
                                    js/gadget-directory-admin-init.js,
                                    js/gadget-directory-admin-init-min.js,
                                    js/qunit/admin-add-controller-test.js,
                                    js/qunit/admin-add-controller-test-min.js
                                </outputDirectoryFiles>
                            </manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                        </feManifestAssociation>
                    </feManifestAssociations>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>