<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Hibernate OGM, Domain model persistence for NoSQL datastores
 ~
 ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later
 ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  -->
<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.hibernate.ogm</groupId>
        <artifactId>hibernate-ogm-parent</artifactId>
        <version>4.1.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>hibernate-ogm-core</artifactId>
    <packaging>jar</packaging>

    <name>Hibernate Object Grid Mapper</name>
    <description>Persist data in a grid rather than a relational database</description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>hibernate-ogm-bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.common</groupId>
            <artifactId>hibernate-commons-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.hql</groupId>
            <artifactId>hibernate-hql-parser</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.hql</groupId>
            <artifactId>hibernate-hql-lucene</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-search-orm</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-search-engine</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.transaction</groupId>
            <artifactId>jboss-transaction-api_1.2_spec</artifactId>
            <scope>provided</scope>
            <!-- I do hope it is optional but that needs to be verified -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml</groupId>
            <artifactId>classmate</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
            <!-- "provided" is used as "compile-only" here; It's NOT needed at runtime -->
            <scope>provided</scope>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.jbossts</groupId>
            <artifactId>jbossjta</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-impl-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                   <forkMode>once</forkMode>
                    <skipExec>${skipUnitTests}</skipExec>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
            </plugin>
            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jboss.maven.plugins</groupId>
                <artifactId>maven-injection-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>bytecode</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <bytecodeInjections>
                        <bytecodeInjection>
                            <expression>${project.version}</expression>
                            <targetMembers>
                                <methodBodyReturn>
                                    <className>org.hibernate.ogm.cfg.impl.Version</className>
                                    <methodName>getVersionString</methodName>
                                </methodBodyReturn>
                            </targetMembers>
                        </bytecodeInjection>
                    </bytecodeInjections>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                </manifest>
                            </archive>
                            <excludes>
                                <exclude>**/hibernate.properties</exclude>
                                <exclude>**/log4j.properties</exclude>
                                <exclude>org/hibernate/ogm/test/**/*</exclude>
                                <exclude>org/hibernate/ogm/utils/test/**/*</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>test</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <skipUnitTests>false</skipUnitTests>
            </properties>
        </profile>
     </profiles>
</project>
