<?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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jbpm</groupId>
    <artifactId>jbpm</artifactId>
    <version>5.2.2.Final</version>
  </parent>

  <artifactId>jbpm-bam</artifactId>

  <name>jBPM :: BAM</name>

  <build>
    <testResources>
        <testResource>
            <directory>src/test/resources</directory>
            <filtering>false</filtering>
        </testResource>
        <testResource>
            <directory>src/test/filtered-resources</directory>
            <filtering>true</filtering>
        </testResource>
    </testResources>
    
    <plugins>
      <plugin>
        <!--  ensure that db files are deleted before _any_ run 
              otherwise we get tests failing because of leftover db's -->
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
         <filesets>
            <fileset>
              <directory>${basedir}</directory>
              <includes>
                <include>btm*</include>
                <include>JPADroolsFlow.*.db</include>
              </includes>
            </fileset>
         </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>
 
  <dependencies>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow-builder</artifactId>
    </dependency> 
    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
    </dependency>
    <!-- Only for the classes which use Hibernate, and we need to deprecate/delete these.. -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-persistence-jpa</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-persistence-jpa</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-persistence-jpa</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>    
    <dependency>
      <groupId>org.codehaus.btm</groupId>
      <artifactId>btm</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
 
  <properties>
    <maven.jdbc.url>jdbc:h2:mem:bamTest;MVCC=TRUE</maven.jdbc.url>

  </properties>
  
  <profiles>
    <profile>
      <id>hibernate-4</id>
       <dependencies>
         <!-- compile necessary for hibernate based (logger) classes -->
         <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-core</artifactId>
           <scope>compile</scope>
         </dependency>
         <dependency>
           <groupId>org.hibernate</groupId>
           <artifactId>hibernate-entitymanager</artifactId>
           <scope>compile</scope>
         </dependency>
      </dependencies>
    </profile>
  </profiles>

</project>
