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

  <parent>
    <groupId>org.apache.mahout</groupId>
    <artifactId>mahout-parent</artifactId>
    <version>0.2</version>
    <relativePath>../maven</relativePath>
  </parent>

  <groupId>org.apache.mahout</groupId>
  <artifactId>mahout-examples</artifactId>
  <version>0.2</version>
  <name>Mahout examples</name>
  <description>Scalable machine learning library examples</description>

  <packaging>jar</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <source>1.6</source>
          <target>1.6</target>
          <optimize>true</optimize>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <!-- configure the plugin here -->
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>examples</id>
            <phase>package</phase>
            <configuration>
              <tasks>
                <ant antfile="../maven/build.xml" target="example-job">
                  <property name="dest" value="${project.build.directory}" />
                  <property name="fullnamever" value="${project.artifactId}-${project.version}" />

                  <property name="version" value="${project.version}" />
                </ant>
                <ant antfile="../maven/build.xml" target="build-grouplens-jar">
                  <property name="dest" value="${project.build.directory}" />
                  <property name="examples-base" value="src/main/java" />
                </ant>
              </tasks>

            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Attach the Job Jar -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${artifactId}-${version}.job</file>
                  <type>job</type>
                  <!--<classifier>job</classifier>-->
                </artifact>

              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <configuration>
          <appendedResourcesDirectory>../src/main/appended-resources</appendedResourcesDirectory>
          <resourceBundles>
            <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
          </resourceBundles>
          <supplementalModels>
            <supplementalModel>supplemental-models.xml</supplementalModel>
          </supplementalModels>
        </configuration>
      </plugin>
    </plugins>

  </build>

  <dependencies>

    <dependency>
      <groupId>org.apache.mahout</groupId>
      <artifactId>mahout-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.mahout</groupId>
      <artifactId>mahout-utils</artifactId>
      <version>${project.version}</version>
    </dependency>


    <!-- A Lucene wikipedia tokenizer/analyzer -->
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-wikipedia</artifactId>
      <version>${lucene.version}</version>
    </dependency>

    <!-- core test -->
    <dependency>
      <groupId>org.apache.mahout</groupId>
      <artifactId>mahout-core</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-benchmark</artifactId>
      <version>${lucene.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.openejb</groupId>
      <artifactId>javaee-api</artifactId>
      <version>5.0-1</version>
    </dependency>

    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.4</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymockclassextension</artifactId>
      <version>2.4</version>
      <scope>test</scope>
    </dependency>

    <!--  cglib contains nested dependencies that interfere with easymock,
          thus the cglib references needs to be below easymock  -->
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib</artifactId>
      <version>2.1_3</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.8</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jcl</artifactId>
      <version>1.5.8</version>
    </dependency>

  </dependencies>


  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/lucene/mahout/tags/mahout-0.2</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/lucene/mahout/tags/mahout-0.2
    </developerConnection>
    <url>https://svn.apache.org/repos/asf/lucene/mahout/mahout-examples/tags/mahout-0.2-examples</url>
  </scm>
</project>
