<?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">
  <parent>
    <artifactId>spark_bigdl</artifactId>
    <groupId>com.intel.analytics.bigdl</groupId>
    <version>0.12.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>bigdl-SPARK_2.3</artifactId>
  <build>
    <plugins>
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <junitxml>.</junitxml>
          <filereports>bigdl-test-report.txt</filereports>
          <parallel>${runSpecsInParallel}</parallel>
          <systemProperties>
            <bigdl.disableCheckSysEnv>true</bigdl.disableCheckSysEnv>
          </systemProperties>
          <argLine>-Xmx6g -XX:MaxPermSize=1g</argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>shade</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.google.protobuf</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
          <execution>
            <id>without-spark</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <filters>
            <filter>
              <artifact>com.google.protobuf</artifact>
              <excludes>
                <exclude>META-INF/maven/com.google.protobuf/protobuf-java/*</exclude>
              </excludes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>com.google.protobuf</pattern>
              <shadedPattern>com.intel.analytics.shaded.protobuf_v_3_5_1</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>with-spark</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>${project.basedir}/src/assembly/all-in-one.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.scoverage</groupId>
        <artifactId>scoverage-maven-plugin</artifactId>
        <version>${scoverage.plugin.version}</version>
        <configuration>
          <aggregate>true</aggregate>
          <highlighting>true</highlighting>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scalastyle</groupId>
        <artifactId>scalastyle-maven-plugin</artifactId>
        <version>0.8.0</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>false</verbose>
          <failOnViolation>true</failOnViolation>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <failOnWarning>false</failOnWarning>
          <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
          <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
          <configLocation>${project.parent.parent.basedir}/scalastyle_config.xml</configLocation>
          <outputFile>${project.build.directory}/stylecheck/scalastyle-output.xml</outputFile>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>per_platform</id>
      <dependencies>
        <dependency>
          <groupId>com.intel.analytics.bigdl.core.dist</groupId>
          <artifactId>${os-flag}</artifactId>
          <version>0.12.2</version>
          <type>pom</type>
        </dependency>
      </dependencies>
      <properties>
        <bigdl-core-all-scope>provided</bigdl-core-all-scope>
      </properties>
    </profile>
    <profile>
      <id>parallel-tests</id>
      <properties>
        <runSpecsInParallel>true</runSpecsInParallel>
        <tagsToExclude>com.intel.analytics.bigdl.tags.Integration</tagsToExclude>
        <tagsToInclude>com.intel.analytics.bigdl.tags.Parallel</tagsToInclude>
      </properties>
    </profile>
    <profile>
      <id>serial-tests</id>
      <properties>
        <runSpecsInParallel>false</runSpecsInParallel>
        <tagsToExclude>com.intel.analytics.bigdl.tags.Parallel,com.intel.analytics.bigdl.tags.Integration</tagsToExclude>
      </properties>
    </profile>
    <profile>
      <id>integration-test</id>
      <properties>
        <tagsToExclude>com.intel.analytics.bigdl.tags.Serial,com.intel.analytics.bigdl.tags.Parallel</tagsToExclude>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.opennlp</groupId>
      <artifactId>opennlp-tools</artifactId>
      <version>1.6.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.twelvemonkeys.imageio</groupId>
      <artifactId>imageio-jpeg</artifactId>
      <version>3.2.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>2.7.3</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>*</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-hdfs</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-app</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-yarn-api</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-core</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-annotations</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.9.9</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-aws</artifactId>
      <version>2.7.3</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>jackson-annotations</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-core</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-databind</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>joda-time</artifactId>
          <groupId>joda-time</groupId>
        </exclusion>
        <exclusion>
          <artifactId>aws-java-sdk</artifactId>
          <groupId>com.amazonaws</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.intel.analytics.bigdl.core.dist</groupId>
      <artifactId>all</artifactId>
      <version>0.12.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>linux64</artifactId>
          <groupId>com.intel.analytics.bigdl.core.dist</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_2.11</artifactId>
      <version>2.3.1</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>avro</artifactId>
          <groupId>org.apache.avro</groupId>
        </exclusion>
        <exclusion>
          <artifactId>avro-mapred</artifactId>
          <groupId>org.apache.avro</groupId>
        </exclusion>
        <exclusion>
          <artifactId>chill_2.11</artifactId>
          <groupId>com.twitter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>chill-java</artifactId>
          <groupId>com.twitter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xbean-asm5-shaded</artifactId>
          <groupId>org.apache.xbean</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-launcher_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-kvstore_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-network-common_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-network-shuffle_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-unsafe_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jets3t</artifactId>
          <groupId>net.java.dev.jets3t</groupId>
        </exclusion>
        <exclusion>
          <artifactId>curator-recipes</artifactId>
          <groupId>org.apache.curator</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-math3</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jul-to-slf4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jcl-over-slf4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>compress-lzf</artifactId>
          <groupId>com.ning</groupId>
        </exclusion>
        <exclusion>
          <artifactId>snappy-java</artifactId>
          <groupId>org.xerial.snappy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>lz4-java</artifactId>
          <groupId>org.lz4</groupId>
        </exclusion>
        <exclusion>
          <artifactId>zstd-jni</artifactId>
          <groupId>com.github.luben</groupId>
        </exclusion>
        <exclusion>
          <artifactId>RoaringBitmap</artifactId>
          <groupId>org.roaringbitmap</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-net</artifactId>
          <groupId>commons-net</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json4s-jackson_2.11</artifactId>
          <groupId>org.json4s</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-client</artifactId>
          <groupId>org.glassfish.jersey.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-common</artifactId>
          <groupId>org.glassfish.jersey.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-server</artifactId>
          <groupId>org.glassfish.jersey.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-container-servlet</artifactId>
          <groupId>org.glassfish.jersey.containers</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-container-servlet-core</artifactId>
          <groupId>org.glassfish.jersey.containers</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-all</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>stream</artifactId>
          <groupId>com.clearspring.analytics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-core</artifactId>
          <groupId>io.dropwizard.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-jvm</artifactId>
          <groupId>io.dropwizard.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-json</artifactId>
          <groupId>io.dropwizard.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-graphite</artifactId>
          <groupId>io.dropwizard.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-databind</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-module-scala_2.11</artifactId>
          <groupId>com.fasterxml.jackson.module</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ivy</artifactId>
          <groupId>org.apache.ivy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>oro</artifactId>
          <groupId>oro</groupId>
        </exclusion>
        <exclusion>
          <artifactId>pyrolite</artifactId>
          <groupId>net.razorvine</groupId>
        </exclusion>
        <exclusion>
          <artifactId>py4j</artifactId>
          <groupId>net.sf.py4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-tags_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-crypto</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-mllib_2.11</artifactId>
      <version>2.3.1</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>scala-parser-combinators_2.11</artifactId>
          <groupId>org.scala-lang.modules</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-streaming_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-sql_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-graphx_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-mllib-local_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-math3</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-tags_2.11</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.intel.analytics.bigdl.spark-version</groupId>
      <artifactId>2.0-SPARK_2.3</artifactId>
      <version>0.12.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalanlp</groupId>
      <artifactId>breeze_2.11</artifactId>
      <version>0.13.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-math3</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.11</artifactId>
      <version>3.0.7</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>scalactic_2.11</artifactId>
          <groupId>org.scalactic</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-reflect</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-xml_2.11</artifactId>
          <groupId>org.scala-lang.modules</groupId>
        </exclusion>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>0.9.9-RC1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>javassist</artifactId>
          <groupId>org.javassist</groupId>
        </exclusion>
        <exclusion>
          <artifactId>dom4j</artifactId>
          <groupId>dom4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>11.0.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.github.scopt</groupId>
      <artifactId>scopt_2.11</artifactId>
      <version>3.5.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>scala-library</artifactId>
          <groupId>org.scala-lang</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>it.unimi.dsi</groupId>
      <artifactId>fastutil</artifactId>
      <version>7.0.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.tensorflow</groupId>
      <artifactId>proto</artifactId>
      <version>1.15.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.spark-project.spark</groupId>
      <artifactId>unused</artifactId>
      <version>1.0.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.scoverage</groupId>
        <artifactId>scoverage-maven-plugin</artifactId>
        <version>${scoverage.plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <properties>
    <scoverage.plugin.version>1.1.1</scoverage.plugin.version>
    <runSpecsInParallel>false</runSpecsInParallel>
    <scoverage.scalacPluginVersion>1.1.1</scoverage.scalacPluginVersion>
    <tagsToExclude>com.intel.analytics.bigdl.tags.Integration</tagsToExclude>
    <scoverage.aggregate>true</scoverage.aggregate>
  </properties>
</project>
