<?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>1.0</version>
    <relativePath>../maven</relativePath>
  </parent>

  <groupId>org.apache.mahout</groupId>
  <artifactId>mahout-core</artifactId>
  <version>0.1</version>
  <name>Mahout core</name>
  <description>Scalable machine learning libraries</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>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>bin</descriptorRef>
          </descriptorRefs>

        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> <!-- this is used for inheritance merges -->
            <phase>package</phase> <!-- append to the packaging phase. -->
            <goals>
              <goal>single</goal> <!-- goals == mojos -->
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- create test jar so other modules can reuse the core test utility classes. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>
                ${project.build.directory}/classes/META-INF
              </outputDirectory>
              <resources>
                <resource>
                  <directory>..</directory>
                  <includes>
                    <include>README.txt</include>
                    <include>NOTICE.txt</include>
                    <include>LICENSE.txt</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Copy dependencies with no official Maven artifacts from libs to local Maven repository -->
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <!-- hadoop -->

        <executions>
          <execution>
            <id>create-hadoop-core-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/hadoop-${hadoop.version}-core.jar</file>
              <groupId>org.apache.mahout.hadoop</groupId>
              <artifactId>hadoop-core</artifactId>
              <packaging>jar</packaging>
              <version>${hadoop.version}</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>

          <execution>
            <id>create-kfs-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/kfs-${kfs.version}.jar</file>
              <groupId>org.apache.mahout.kosmofs</groupId>
              <artifactId>kfs</artifactId>
              <packaging>jar</packaging>
              <version>${kfs.version}</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>

          <execution>
            <id>create-jets3t-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/jets3t-${jets3t.version}.jar</file>
              <groupId>org.apache.mahout.jets3t</groupId>
              <artifactId>jets3t</artifactId>
              <packaging>jar</packaging>
              <version>${jets3t.version}</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>
          <!-- watchmaker -->

          <execution>
            <id>create-watchmaker-framework-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/watchmaker-framework-${watchmaker.version}.jar</file>
              <groupId>org.apache.mahout.watchmaker</groupId>
              <artifactId>watchmaker-framework</artifactId>
              <packaging>jar</packaging>
              <version>${watchmaker.version}</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>

          <execution>
            <id>create-watchmaker-swing-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/watchmaker-swing-${watchmaker.version}.jar</file>
              <groupId>org.apache.mahout.watchmaker</groupId>
              <artifactId>watchmaker-swing</artifactId>
              <packaging>jar</packaging>
              <version>${watchmaker.version}</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>

          <execution>
            <id>create-uncommons-math-artifact</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/uncommons-maths-1.0.2.jar</file>
              <groupId>org.apache.mahout.uncommons.math</groupId>
              <artifactId>uncommons-math</artifactId>
              <packaging>jar</packaging>
              <version>1.0.2</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>
          <execution>
            <id>create-commons-cli</id>
            <phase>validate</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>lib/commons-cli-2.0-mahout.jar</file>
              <groupId>org.apache.mahout.commons</groupId>
              <artifactId>commons-cli</artifactId>
              <packaging>jar</packaging>
              <version>2.0-mahout</version>
              <generatePom>true</generatePom>
              <createChecksum>true</createChecksum>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
          <url>${deploy.url}</url>
          <repositoryId>mahout.dist</repositoryId>
          <updateReleaseInfo>true</updateReleaseInfo>
        </configuration>
        <executions>
          <execution>
            <id>create-hadoop-core-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/hadoop-${hadoop.version}-core.jar</file>
              <groupId>org.apache.mahout.hadoop</groupId>
              <artifactId>hadoop-core</artifactId>
              <packaging>jar</packaging>
              <version>${hadoop.version}</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>

          <execution>
            <id>create-kfs-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/kfs-${kfs.version}.jar</file>
              <groupId>org.apache.mahout.kosmofs</groupId>
              <artifactId>kfs</artifactId>
              <packaging>jar</packaging>
              <version>${kfs.version}</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>

          <execution>
            <id>create-jets3t-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/jets3t-${jets3t.version}.jar</file>
              <groupId>org.apache.mahout.jets3t</groupId>
              <artifactId>jets3t</artifactId>
              <packaging>jar</packaging>
              <version>${jets3t.version}</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>

          <!-- watchmaker -->

          <execution>
            <id>create-watchmaker-framework-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/watchmaker-framework-${watchmaker.version}.jar</file>
              <groupId>org.apache.mahout.watchmaker</groupId>
              <artifactId>watchmaker-framework</artifactId>
              <packaging>jar</packaging>
              <version>${watchmaker.version}</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>

          <execution>
            <id>create-watchmaker-swing-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/watchmaker-swing-${watchmaker.version}.jar</file>
              <groupId>org.apache.mahout.watchmaker</groupId>
              <artifactId>watchmaker-swing</artifactId>
              <packaging>jar</packaging>
              <version>${watchmaker.version}</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>

          <execution>
            <id>create-uncommons-math-artifact</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/uncommons-maths-1.0.2.jar</file>
              <groupId>org.apache.mahout.uncommons.math</groupId>
              <artifactId>uncommons-math</artifactId>
              <packaging>jar</packaging>
              <version>1.0.2</version>
              <generatePom>true</generatePom>
            </configuration>
          </execution>
          <execution>
            <id>create-commons-cli</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>lib/commons-cli-2.0-mahout.jar</file>
              <groupId>org.apache.mahout.commons</groupId>
              <artifactId>commons-cli</artifactId>
              <packaging>jar</packaging>
              <version>2.0-mahout</version>
              <generatePom>true</generatePom>

            </configuration>
          </execution>
        </executions>
      </plugin>


      <!-- Build the Job Jar -->
      <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>
            <phase>package</phase>
            <configuration>
              <tasks>
                <ant antfile="../maven/build.xml" target="core-job">
                  <property name="dest" value="${project.build.directory}" />
                  <property name="fullnamever" value="${project.artifactId}-${project.version}" />
                  <property name="core-lib" value="lib" />
                  <property name="shared-lib" value="../lib" />
                </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>
    </plugins>
  </build>


  <dependencies>

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

    <dependency>
      <groupId>org.apache.mahout.kosmofs</groupId>
      <artifactId>kfs</artifactId>
      <version>${kfs.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.mahout.jets3t</groupId>
      <artifactId>jets3t</artifactId>
      <version>${jets3t.version}</version>
    </dependency>

    <dependency>
      <groupId>xmlenc</groupId>
      <artifactId>xmlenc</artifactId>
      <version>${xmlenc.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>

    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.1</version>
    </dependency>

    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.2.2</version>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.4</version>
    </dependency>


    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <exclusions>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jmx</groupId>
          <artifactId>jmxri</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

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

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

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.4</version>
    </dependency>


    <dependency>
      <groupId>org.apache.mahout.watchmaker</groupId>
      <artifactId>watchmaker-framework</artifactId>
      <version>${watchmaker.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.mahout.watchmaker</groupId>
      <artifactId>watchmaker-swing</artifactId>
      <version>${watchmaker.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.mahout.uncommons.math</groupId>
      <artifactId>uncommons-math</artifactId>
      <version>1.0.2</version>
    </dependency>

    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-analyzers</artifactId>
      <version>2.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>2.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.mahout.commons</groupId>
      <artifactId>commons-cli</artifactId>
      <version>2.0-mahout</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
    
    <!--  Gson: Java to Json conversion -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>1.3</version>
      <scope>compile</scope>
    </dependency>
    
  </dependencies>
  <repositories>
    <repository>
      <id>Apache snapshots</id>
      <url>http://people.apache.org/maven-snapshot-repository</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>    
    <repository>
      <id>gson</id>
      <url>http://google-gson.googlecode.com/svn/mavenrepo</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
  </repositories>


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