<?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>apache-james-mailbox</artifactId>
        <version>3.9.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>apache-james-mailbox-jpa</artifactId>
    <packaging>jar</packaging>
    <name>Apache James :: Mailbox :: JPA</name>

    <properties>
        <target.jdk>11</target.jdk>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-backends-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-backends-jpa</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-api</artifactId>
        </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-store</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-store</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-tools-quota-recompute</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>apache-james-mailbox-tools-quota-recompute</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>event-bus-in-vm</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-json</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-data-jpa</artifactId>
            <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-tests</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>testing-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.angus</groupId>
            <artifactId>jakarta.mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </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>
                    <reuseForks>false</reuseForks>
                    <forkCount>1</forkCount>
                    <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 -Dopenjpa.Multithreaded=true</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa-maven-plugin</artifactId>
                <version>${apache.openjpa.version}</version>
                <configuration>
                    <includes>org/apache/james/mailbox/jpa/*/model/**/*.class</includes>
                    <excludes>org/apache/james/mailbox/jpa/mail/model/openjpa/EncryptDecryptHelper.class</excludes>
                    <addDefaultConstructor>true</addDefaultConstructor>
                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
                    <persistenceXmlFile>${basedir}/src/test/resources/persistence.xml</persistenceXmlFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.xbean</groupId>
                        <artifactId>xbean-asm9-shaded</artifactId>
                        <version>4.23</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>enhancer</id>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
