<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements. See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership. The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied. See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<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>org.apache.james</groupId>
        <artifactId>james-server</artifactId>
        <version>3.8.0-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>james-server-protocols-imap4</artifactId>
    <packaging>jar</packaging>

    <name>Apache James :: Server :: IMAP</name>

    <dependencies>
        <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-memory</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-memory</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>event-bus-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-filesystem-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-jwt</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-protocols-library</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-protocols-library</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>james-server-util</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>metrics-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>metrics-tests</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>testing-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.protocols.groupId}</groupId>
            <artifactId>protocols-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.protocols.groupId}</groupId>
            <artifactId>protocols-imap</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.protocols.groupId}</groupId>
            <artifactId>protocols-netty</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jzlib</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.hakky54</groupId>
            <artifactId>sslcontext-kickstart-for-pem</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-configuration2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mock-server</groupId>
            <artifactId>mockserver-netty</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.jcraft</groupId>
                    <artifactId>jzlib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <!--https://issues.apache.org/jira/browse/JAMES-3724-->
                        <james.lifecycle.leak.detection.mode>testing</james.lifecycle.leak.detection.mode>
                        <!--https://netty.io/wiki/reference-counted-objects.html#best-practices-to-avoid-leaks -->
                        <io.netty.leakDetection.level>PARANOID</io.netty.leakDetection.level>
                    </systemPropertyVariables>
                    <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 -Xmx1024m</argLine>
                    <reuseForks>true</reuseForks>
                    <!-- Fail tests longer than 20 minutes, prevent form random locking tests -->
                    <forkedProcessTimeoutInSeconds>1200</forkedProcessTimeoutInSeconds>
                    <excludedGroups>unstable</excludedGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
