<?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.confluence.plugins</groupId>
        <artifactId>confluence-inbound-email-parent</artifactId>
        <version>20.2.11</version>
    </parent>

    <artifactId>confluence-email-gateway</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Confluence Email Gateway</name>
    <description>This allows users to create content by sending an email to Confluence.</description>

    <properties>

        <!-- sbom properties -->
        <npm.install.skip>false</npm.install.skip>
        <npm.test.skip>false</npm.test.skip>
        <npm.workspace.install.skip>true</npm.workspace.install.skip>
        <skipJacocoReport>false</skipJacocoReport>
        <test-coverage.skip-copy-integration-test-report>false</test-coverage.skip-copy-integration-test-report>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-email2-jakarta</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
            <version>0.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.mail</groupId>
            <artifactId>jakarta.mail-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.plugins</groupId>
            <artifactId>share-page</artifactId>
            <version>${atlassian.share-page.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.plugins</groupId>
            <artifactId>confluence-notifications-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin.notifications</groupId>
            <artifactId>notifications-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth2</groupId>
            <artifactId>oauth2-client-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.mail</groupId>
            <artifactId>atlassian-mail</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-bridge</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</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.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.secrets</groupId>
            <artifactId>atlassian-secrets-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-oauth2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.angus</groupId>
            <artifactId>angus-mail</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security.serialblocklist</groupId>
            <artifactId>blocklist-xstream-adapter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.security.serialblocklist</groupId>
            <artifactId>serialblocklist</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>propertyset</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>confluence-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <skipAllPrompts>true</skipAllPrompts>
                    <extractDependencies>false</extractDependencies>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Import-Package>com.atlassian.annotations,
                            com.atlassian.annotations.nullability,
                            com.atlassian.confluence.api.model.accessmode,
                            com.atlassian.confluence.api.model.content.id,
                            com.atlassian.confluence.api.model.pagination,
                            com.atlassian.confluence.api.model.people,
                            com.atlassian.confluence.api.service.accessmode,
                            com.atlassian.confluence.api.service.exceptions,
                            com.atlassian.confluence.content.ui,
                            com.atlassian.confluence.labels,
                            com.atlassian.confluence.labels.dto,
                            com.atlassian.confluence.labels.persistence.dao,
                            com.atlassian.confluence.license,
                            com.atlassian.confluence.license.exception,
                            com.atlassian.confluence.search.service,
                            com.atlassian.confluence.search.v2,
                            com.atlassian.confluence.security.access,
                            com.atlassian.confluence.security.login,
                            com.atlassian.confluence.status.service,
                            com.atlassian.confluence.status.service.systeminfo,
                            com.atlassian.confluence.struts,
                            com.atlassian.confluence.themes,
                            com.atlassian.confluence.user.actions,
                            com.atlassian.confluence.user.persistence.dao.compatibility,
                            com.atlassian.confluence.xhtml.api,
                            com.atlassian.confluence.content.render.xhtml,
                            com.atlassian.confluence.content.render.xhtml.model.inline,
                            com.atlassian.confluence.content.render.xhtml.model.inlinetask,
                            com.atlassian.confluence.content.render.xhtml.editor,
                            com.atlassian.confluence.content.render.xhtml.links,
                            com.atlassian.confluence.content.render.xhtml.storage.macro.inlinebody,
                            com.atlassian.confluence.content.render.xhtml.macro,
                            com.atlassian.confluence.content.render.xhtml.transformers,
                            com.atlassian.confluence.plugin.descriptor.web.conditions,
                            com.atlassian.core.exception,
                            com.atlassian.crowd.exception,
                            com.atlassian.crowd.exception.runtime,
                            com.atlassian.extras.api,
                            com.atlassian.extras.api.confluence,
                            com.atlassian.oauth2.client.api.lib.flow,
                            com.atlassian.oauth2.client.api.storage.config,
                            com.atlassian.plugin.osgi.bridge.external,
                            com.atlassian.plugin.osgi.external,
                            com.atlassian.plugin.predicate,
                            com.atlassian.plugin.web,
                            com.atlassian.plugin.web.api,
                            com.atlassian.plugin.web.api.model,
                            com.atlassian.sal.api,
                            com.atlassian.sal.api.timezone,
                            com.atlassian.struts.multipart,
                            com.atlassian.user.search,
                            com.atlassian.user.search.page,
                            com.atlassian.user.security.password,
                            org.apache.struts2.dispatcher,
                            org.springframework.transaction.annotation,
                            *</Import-Package>
                        <Export-Package>com.atlassian.confluence.plugins.emailgateway.api*,
                            com.atlassian.confluence.plugins.emailgateway.events*</Export-Package>
                    </instructions>
                    <includedFeModuleManifests>
                        <includedFeModuleManifest>${project.basedir}/package.json</includedFeModuleManifest>
                        <includedFeModuleManifest>${project.basedir}/package-lock.json</includedFeModuleManifest>
                    </includedFeModuleManifests>
                    <feManifestAssociations>
                        <feManifestAssociation>
                            <outputDirectoryFilesDeclaration>${project.basedir}/fe-associations-declaration.json</outputDirectoryFilesDeclaration>
                        </feManifestAssociation>
                    </feManifestAssociations>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>sonar-ut</id>
            <properties>
                <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../confluence-email-gateway/target/site/jacoco-unit/${jacoco.report.name}</sonar.coverage.jacoco.xmlReportPaths>
            </properties>
        </profile>
        <profile>
            <id>sonar-it</id>
            <properties>
                <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco-integration/${jacoco.report.name}</sonar.coverage.jacoco.xmlReportPaths>
            </properties>
        </profile>
    </profiles>
</project>
