<?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>org.apache.james</groupId>
        <artifactId>jmap-draft-integration-testing</artifactId>
        <version>3.8.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>rabbitmq-jmap-draft-integration-testing</artifactId>
    <packaging>jar</packaging>

    <name>Apache James :: Server :: JMAP (draft) :: RabbitMQ + Object Store + Cassandra Integration testing</name>

    <dependencies>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-backends-cassandra</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-backends-opensearch</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-backends-rabbitmq</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-scanning-search</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>blob-s3</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>blob-s3-guice</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-cassandra-app</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-distributed-app</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-distributed-app</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-dnsservice-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-guice-common</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-guice-jmap</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-jmap-draft-integration-testing</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-testing</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>testing-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-guice</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.javacrumbs.json-unit</groupId>
            <artifactId>json-unit-assertj</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Djava.library.path=
                        -javaagent:"${settings.localRepository}"/org/jacoco/org.jacoco.agent/${jacoco-maven-plugin.version}/org.jacoco.agent-${jacoco-maven-plugin.version}-runtime.jar=destfile=${basedir}/target/jacoco.exec
                        -Xms512m -Xmx2048m</argLine>
                    <reuseForks>true</reuseForks>
                    <!-- Fail tests longer than 30 minutes, prevent form random locking tests -->
                    <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
                    <groups combine.self="override">org.apache.james.junit.categories.BasicFeature,org.apache.james.jmap.categories.EnableCucumber</groups>
                    <excludedGroups>org.apache.james.junit.categories.Unstable</excludedGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>unstable-tests</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <version>2.22.2</version>
                            <configuration>
                                <excludedGroups />
                                <groups combine.self="override">org.apache.james.junit.categories.Unstable</groups>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
