<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.babyfish</groupId>
    <artifactId>babyfish-parent</artifactId>
    <version>1.1.0.Alpha</version>
  </parent>
  <artifactId>babyfish-hibernate-extension</artifactId>
  
  <name>babyfish-hibernate-extension</name>
  <description>The hibernate enhancement project of BabyFish.</description>
  <url>https://github.com/babyfish-ct/babyfish</url>

  <licenses>
    <license>
      <name>LGPL-3.0</name>
      <url>http://opensource.org/licenses/LGPL-3.0</url>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <name>Tao Chen(Chinese Name: &#38472;&#28059;)</name>
      <email>babyfish-ct@163.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git@github.com/babyfish-ct/babyfish.git</connection>
    <developerConnection>scm:git@github.com/babyfish-ct/babyfish.git</developerConnection>
    <url>https://github.com/babyfish-ct/babyfish</url>
  </scm>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  
  <profiles>
    <profile>
      <id>oracle</id>
      <activation>
        <property>
          <name>oracle</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.oracle</groupId>
          <artifactId>ojdbc6</artifactId>
          <version>11.2.0.1.0</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  
  <dependencies>
    <dependency>
      <groupId>org.babyfish</groupId>
      <artifactId>babyfish-collection</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.babyfish</groupId>
      <artifactId>babyfish-jpa-extension</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.babyfish</groupId>
      <artifactId>babyfish-hibernate-model</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.babyfish</groupId>
      <artifactId>babyfish-util</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.babyfish</groupId>
      <artifactId>babyfish-junit</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jandex</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml</groupId>
      <artifactId>classmate</artifactId>
      <version>0.5.4</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb-j5</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
 
  <build>
    <plugins>
      <plugin>
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <version>2.2.4</version>
        <executions>
          <execution>
            <id>process-test</id>
            <goals>
              <goal>process-test</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <outputDirectory>${project.build.directory}/metamodel</outputDirectory>
              <processors>
                  <processor>
                    org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
                  </processor>
                <processor>
                    org.babyfish.model.jpa.source.TypedQueryPathProcessor
                  </processor>
              </processors>
              <excludes>
                  <value>**/*Test.java</value>
                  <value>**/Abstract*.java</value>
                  <value>**/*Dialect.java</value>
                  <value>/org/babyfish/hibernate/*.java</value>
                  <value>**/*Scope.java</value>
              </excludes>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-jpamodelgen</artifactId>
            <version>${hibernate.version}</version>
          </dependency>
          <dependency>
            <groupId>org.babyfish</groupId>
            <artifactId>babyfish-jpa-model-tool</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.3</version>
        <executions>
          <execution>
            <id>add-test-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/metamodel</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.babyfish</groupId>
        <artifactId>babyfish-instrument-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>instrument</goal>
              <goal>instrument-test</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>babyfish-hibernate-model-tool</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

</project>
