<?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">
  <parent>
    <artifactId>openimaj-hadoop-tools</artifactId>
    <groupId>org.openimaj</groupId>
    <version>1.3.1</version>
    <relativePath>../</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.openimaj.hadoop.tools</groupId>
  <artifactId>HadoopTwitterTokenTool</artifactId>
  <version>1.3.1</version>
  <packaging>jar</packaging>
  <name>HadoopTwitterTokenTool</name>
  <inceptionYear>2011</inceptionYear>
  <description>Tool for clustering and quantising features using Map-Reduce 
    jobs on a Hadoop cluster.</description>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>net.sourceforge.jmatio</groupId>
      <artifactId>jmatio</artifactId>
      <version>1.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.openimaj</groupId>
      <artifactId>twitter</artifactId>
      <version>1.3.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.openimaj.hadoop.tools</groupId>
      <artifactId>HadoopTwitterPreprocessingTool</artifactId>
      <version>1.3.1</version>
    </dependency>
		<dependency>
	      <groupId>org.apache.hadoop</groupId>
				<artifactId>hadoop-core</artifactId>
				<version>2.0.0-mr1-cdh4.7.0</version>
				<scope>provided</scope>
    </dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
			<scope>provided</scope>
		</dependency>
    <dependency>
      <groupId>org.openimaj.hadoop.tools</groupId>
      <artifactId>core-hadoop-tool</artifactId>
      <version>1.3.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.openimaj</groupId>
      <artifactId>core</artifactId>
      <version>1.3.1</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <profiles>
      <profile>
        <id>minijar</id>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-shade-plugin</artifactId>
              <version>2.0</version>
              <executions>
                <execution>
                  <configuration>
                    <finalName>HadoopTokenTool-mini</finalName>
                    <filters>
                      <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                          <exclude>META-INF/*.SF</exclude>
                          <exclude>META-INF/*.DSA</exclude>
                          <exclude>META-INF/*.RSA</exclude>
                        </excludes>
                      </filter>
                    </filters>
                    <transformers>
                      <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                        <manifestEntries>
                          <Main-Class>org.openimaj.hadoop.tools.twitter.HadoopTwitterTokenTool</Main-Class>
                        </manifestEntries>
                      </transformer>
                      <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                        <resource>.bin</resource>
                      </transformer>
                    </transformers>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>
    </profiles>
  <build>
    <plugins>
      <!-- <plugin><groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId><version>1.3</version><executions><execution><id>add-source</id><phase>generate-sources</phase><goals><goal>add-source</goal></goals><configuration><sources><source>/usr/local/hadoop/conf/</source></sources></configuration></execution></executions></plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <argLine>-Xmx3G -Djava.awt.headless=true</argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <finalName>HadoopTwitterTokenTool</finalName>
          <!-- <appendAssemblyId>true</appendAssemblyId>-->
          <!-- <descriptors><descriptor>assembly.xml</descriptor></descriptors>-->
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <archive>
            <manifest>
              <mainClass>org.openimaj.hadoop.tools.twitter.HadoopTwitterTokenTool</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.9.0</version>
        <configuration>
          <header>src/etc/header.txt</header>
          <strictCheck>true</strictCheck>
          <properties>
            <year>${project.inceptionYear}</year>
          </properties>
          <excludes>
            <exclude>AUTHORS</exclude>
            <exclude>COPYING</exclude>
            <exclude>**/words</exclude>
            <exclude>**/*.lzo</exclude>
            <exclude>**/*.index</exclude>
          </excludes>
          <mapping>
            <jtemp>JAVADOC_STYLE</jtemp>
          </mapping>
          <useDefaultMapping>true</useDefaultMapping>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>