<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>
  <groupId>apache.wiki</groupId>
  <artifactId>RecommenderSystems</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>${project.artifactId}</name>
  <description>My wonderfull scala app</description>
  <inceptionYear>2015</inceptionYear>
  <licenses>
    <license>
      <name>My License</name>
      <url>http://....</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <properties>
      <!--
    <spark.version>2.1.0</spark.version>
    -->
        <spark.version>1.6.2</spark.version>
        <scala.version>2.10</scala.version>
  </properties>

  <repositories>
    <repository>
      <id>scala-tools.org</id>
      <name>Scala-Tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>scala-tools.org</id>
      <name>Scala-Tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>
    </pluginRepository>
  </pluginRepositories>



  <dependencies>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming_${scala.version}</artifactId>
      <version>${spark.version}</version>
        <!--<scope>provided</scope>-->
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_${scala.version}</artifactId>
      <version>${spark.version}</version>
        <!--<scope>provided</scope>-->
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-hive_${scala.version}</artifactId>
      <version>${spark.version}</version>
        <!--<scope>provided</scope>-->
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-mllib_${scala.version}</artifactId>
      <version>${spark.version}</version>
        <!--<scope>provided</scope>-->
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>1.7.7</version>
        <!--<scope>provided</scope>-->
    </dependency>


    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.specs</groupId>
      <artifactId>specs</artifactId>
      <version>1.2.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.databricks</groupId>
      <artifactId>spark-csv_2.10</artifactId>
      <version>1.3.0</version>
        <!--<scope>provided</scope>-->
    </dependency>

  </dependencies>


  <build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                        <finalName>example-${project.version}</finalName>
                        <artifactSet>
                            <excludes>
                                <exclude>oro*</exclude>
                                <!--exclude>org.apache.*:*</exclude-->
                                <exclude>junit:junit</exclude>
                                <exclude>org.*</exclude>
                                <exclude>au.*</exclude>
                                <exclude>codegen.*</exclude>
                                <exclude>images.*</exclude>
                                <exclude>javaewah.*</exclude>
                                <exclude>javassist.*</exclude>
                                <exclude>javax.*</exclude>
                                <exclude>javolution.*</exclude>
                                <exclude>jodd.*</exclude>
                                <exclude>parquet.*</exclude>
                                <exclude>repackage.*</exclude>
                                <exclude>templates.*</exclude>
                                <exclude>webapps.*</exclude>
                                <exclude>schemaorg_apache_xmlbeans.*</exclude>
                                <exclude>com.google.*</exclude>
                                <exclude>com.facebook.*</exclude>
                                <exclude>com.m.*</exclude>
                                <exclude>org.*</exclude>
                                <exclude>*:xml-apis</exclude>
                                <exclude>log4j*</exclude>
                                <exclude>org.antlr*</exclude>
                                <exclude>org.datanucleus*</exclude>
                                <exclude>net*</exclude>
                                <exclude>commons*</exclude>
                                <exclude>com.j*</exclude>
                                <exclude>com.x*</exclude>
                                <exclude>com.n*</exclude>
                                <exclude>com.i*</exclude>
                                <exclude>com.t*</exclude>
                                <exclude>com.c*</exclude>
                                <exclude>com.gi*</exclude>
                                <exclude>com.f*</exclude>
                                <exclude>com.su*</exclude>
                                <exclude>com.a*</exclude>
                                <exclude>com.e*</exclude>
                                <exclude>javax*</exclude>
                                <exclude>s*</exclude>
                                <exclude>i*</exclude>
                                <exclude>j*</exclude>
                                <exclude>a*</exclude>
                                <exclude>x*</exclude>
                            </excludes>
                        </artifactSet>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scalaVersion>${scala.version}.6</scalaVersion>
          <args>
            <arg>-target:jvm-1.5</arg>
          </args>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <downloadSources>true</downloadSources>
          <buildcommands>
            <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
          </buildcommands>
          <additionalProjectnatures>
            <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
          </additionalProjectnatures>
          <classpathContainers>
            <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
            <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
          </classpathContainers>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
          <version>2.15.2</version>
        <configuration>
          <scalaVersion>${scala.version}.6</scalaVersion>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>
