<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.terracotta.modules</groupId>
    <artifactId>tim-ehcache</artifactId>
    <version>1.5.4</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.terracotta.modules</groupId>
  <artifactId>tim-ehcache-2.0-hibernate-ui</artifactId>
  <name>tim-ehcache-2.0-hibernate-ui</name>
  <description>Hibernate</description>
  
  <properties>
    <ehcache-core.version>2.1.0</ehcache-core.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate</artifactId>
      <version>3.2.7.ga</version>
      <exclusions>
        <exclusion>
          <groupId>net.sf.ehcache</groupId>
          <artifactId>ehcache</artifactId>
        </exclusion>
      </exclusions>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.terracotta</groupId>
      <artifactId>terracotta</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.sf.ehcache</groupId>
      <artifactId>ehcache-core</artifactId>
      <version>${ehcache-core.version}</version>
      <scope>provided</scope>
    </dependency>    
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <includeGroupIds>net.sf.ehcache</includeGroupIds>
              <includeArtifactIds>ehcache-core</includeArtifactIds>
              <includes>net/sf/ehcache/hibernate/management/api/*</includes>
              <outputDirectory>${project.build.directory}/classes</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>org.terracotta.maven.plugins</groupId>
        <artifactId>tc-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <terracottaProjectStatus>Experimental</terracottaProjectStatus>
              <presentationFactory>org.terracotta.modules.hibernatecache.presentation.HibernateCachePresentationFactory</presentationFactory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
  <repositories>
    <repository>
      <id>terracotta-repository</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>terracotta-repository</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
  
</project>
