<?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-data-jpa</artifactId>
    <packaging>jar</packaging>

    <name>Apache James :: Server :: Data :: JPA Persistence</name>

    <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>james-server-core</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-data-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-data-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-data-library</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-data-library</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-dnsservice-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-dnsservice-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-lifecycle-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-mailrepository-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${james.groupId}</groupId>
            <artifactId>james-server-mailrepository-api</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>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </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.cucumber</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-configuration2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <scope>test</scope>
        </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.openjpa</groupId>
                <artifactId>openjpa-maven-plugin</artifactId>
                <version>${apache.openjpa.version}</version>
                <configuration>
                    <includes>org/apache/james/sieve/jpa/model/JPASieveQuota.class,
                        org/apache/james/sieve/jpa/model/JPASieveScript.class,
                        org/apache/james/user/jpa/model/JPAUser.class,
                        org/apache/james/rrt/jpa/model/JPARecipientRewrite.class,
                        org/apache/james/domainlist/jpa/model/JPADomain.class,
                        org/apache/james/mailrepository/jpa/model/JPAUrl.class,
                        org/apache/james/mailrepository/jpa/model/JPAMail.class</includes>
                    <addDefaultConstructor>true</addDefaultConstructor>
                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
                    <toolProperties>
                        <property>
                            <name>log</name>
                            <value>TOOL=TRACE</value>
                        </property>
                        <property>
                            <name>metaDataFactory</name>
                            <value>jpa(Types=org.apache.james.sieve.jpa.model.JPASieveQuota;
                                org.apache.james.sieve.jpa.model.JPASieveScript;
                                org.apache.james.user.jpa.model.JPAUser;
                                org.apache.james.rrt.jpa.model.JPARecipientRewrite;
                                org.apache.james.domainlist.jpa.model.JPADomain;
                                org.apache.james.mailrepository.jpa.model.JPAUrl;
                                org.apache.james.mailrepository.jpa.model.JPAMail)</value>
                        </property>
                    </toolProperties>
                    <persistenceXmlFile>${basedir}/src/test/resources/persistence.xml</persistenceXmlFile>
                </configuration>
                <executions>
                    <execution>
                        <id>enhancer</id>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
