<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>lenskit</artifactId>
    <groupId>org.grouplens.lenskit</groupId>
    <version>2.0.5</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>lenskit-archetype-simple-analysis</artifactId>
  <name>Simple Experiment Archetype</name>
  <packaging>maven-archetype</packaging>

  <build>

    <!-- Set things up so the maven-archetype packaging is recognized. -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.archetype</groupId>
        <artifactId>archetype-packaging</artifactId>
        <version>2.2</version>
      </extension>
    </extensions>

    <!-- This code turns on filtering for the archetype-resources pom.xml 
      file, so we can set the version numbers at the time we install the archetype. 
      We turn OFF filtering for all other files, so they can avoid substitution 
      until the archetype is used to create a new project. -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>archetype-resources/pom.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>archetype-resources/pom.xml</exclude>
        </excludes>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
          <!-- We create an escape character so we can avoid substituting 
            some of the ${} occurrences in our pom.xml file, since some of them are things 
            that should only be filtered at at project creation time, not at archetype 
            install time. -->
          <configuration>
            <escapeString>\</escapeString>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>
</project>
