<?xml version="1.0"?>
<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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>net.sf.ehcache</groupId>
    <artifactId>ehcache-parent</artifactId>
    <version>2.4</version>
    <relativePath/>
  </parent>

  <name>ehcache-root</name>
  <artifactId>ehcache-root</artifactId>
  <packaging>pom</packaging>
  <version>2.7.0</version>
  
  <properties>
    <slf4j.version>1.6.6</slf4j.version>
    <sizeof-agent.version>1.0.2-SNAPSHOT</sizeof-agent.version>
    <maven-forge-plugin.version>1.0.7</maven-forge-plugin.version>
    <gmaven-plugin.version>1.4</gmaven-plugin.version>
  </properties>  

  <modules>
    <module>ehcache-core</module>
    <module>terracotta</module>
    <module>ehcache</module>
    <module>management-ehcache</module>
    <module>management-ehcache-impl</module>
    <module>ehcache-scheduled-refresh</module>
  </modules>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.terracotta</groupId>
        <artifactId>maven-forge-plugin</artifactId>
        <version>${maven-forge-plugin.version}</version>
        <executions>
          <execution>
            <id>generateBuildInfoFile</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>buildinfo</goal>
            </goals>
            <configuration>
              <generateBuildInfoFile>true</generateBuildInfoFile>
              <buildInfoLocation>${project.build.outputDirectory}</buildInfoLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>    
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>skip-system-tests</id>
      <activation>
        <property>
          <name>!jenkins.publisher</name>
        </property>
      </activation>
      <modules>
        <module>system-tests</module>
      </modules>
    </profile>
    <profile>
      <id>dist</id>
      <modules>
        <module>distribution</module>
      </modules>
    </profile>
    <profile>
      <id>devmode</id>
      <activation>
        <file>
          <exists>${user.home}/.devmode</exists>
        </file>
      </activation>      
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <version>${gmaven-plugin.version}</version>
            <executions>
              <execution>
                <id>generate-devmode-classpath</id>
                <phase>compile</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <source>
                    println "================== devmode ===================="
                    def classesDir = new File(project.build.outputDirectory)
                    classesDir.mkdirs()
                    def targetFile = new File(classesDir, "devmode-classdir.txt")
                    targetFile.withWriter { out -&gt;
                      out.println classesDir
                    }
                  </source>
                </configuration>
              </execution>
            </executions>            
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>
  
  <repositories>
    <repository>
      <id>terracotta-snapshots</id>
      <url>http://www.terracotta.org/download/reflector/snapshots</url>
    </repository>
    <repository>
      <id>terracotta-releases</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>
    </repository>
  </repositories>
  
  <pluginRepositories>
    <pluginRepository>
      <id>terracotta-snapshots</id>
      <url>http://www.terracotta.org/download/reflector/snapshots</url>
    </pluginRepository>
    <pluginRepository>
      <id>terracotta-releases</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>
    </pluginRepository>
  </pluginRepositories>   
</project>
