<?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/maven-v4_0_0.xsd">
    <parent>
        <groupId>org.sistcoop</groupId>
        <artifactId>openfact</artifactId>
        <version>1.0.RC25</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>openfact-model-jpa</artifactId>
    <name>Openfact Model JPA</name>

    <properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <show_sql>true</show_sql>
        <format_sql>true</format_sql>
        <hbm2ddl.auto>update</hbm2ddl.auto>
        <cache.use_second_level_cache>true</cache.use_second_level_cache>
    </properties>

    <dependencies>
        <!-- Openfact -->
        <dependency>
            <groupId>org.sistcoop</groupId>
            <artifactId>openfact-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.sistcoop</groupId>
            <artifactId>openfact-server-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.sistcoop</groupId>
            <artifactId>openfact-server-spi-private</artifactId>
        </dependency>
        <dependency>
            <groupId>org.sistcoop</groupId>
            <artifactId>openfact-integration</artifactId>
        </dependency>

        <!-- Java EE 7 -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-java8</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <show_sql>false</show_sql>
                <format_sql>false</format_sql>
                <hbm2ddl.auto>update</hbm2ddl.auto>
                <cache.use_second_level_cache>true</cache.use_second_level_cache>
            </properties>
        </profile>
        <profile>
            <id>openshift</id>
            <properties>
                <show_sql>false</show_sql>
                <format_sql>false</format_sql>
                <hbm2ddl.auto>update</hbm2ddl.auto>
                <cache.use_second_level_cache>true</cache.use_second_level_cache>
            </properties>
        </profile>
    </profiles>
</project>
