<?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>flink_ai_extended</artifactId>
    <groupId>com.alibaba.flink.ml</groupId>
    <version>0.2.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>flink-ml-examples</artifactId>
  <build>
    <plugins>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>3.2.2</version>
        <executions>
          <execution>
            <id>eclipse-add-source</id>
            <goals>
              <goal>add-source</goal>
            </goals>
          </execution>
          <execution>
            <id>scala-compile-first</id>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scalaVersion>${scala.major.version}</scalaVersion>
          <recompileMode>incremental</recompileMode>
          <useZincServer>true</useZincServer>
          <args>
            <arg>-unchecked</arg>
            <arg>-deprecation</arg>
            <arg>-feature</arg>
          </args>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>flink.ml.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>flink.ml.io.netty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>flink.ml.com.google.common</shadedPattern>
                </relocation>
              </relocations>
              <artifactSet>
                <excludes>
                  <exclude>org.apache.flink:*</exclude>
                  <exclude>xerces:xercesImpl</exclude>
                  <exclude>io.netty:netty</exclude>
                  <exclude>org.scala-lang:*</exclude>
                  <exclude>com.typesafe.akka:*</exclude>
                  <exclude>org.apache.ant:</exclude>
                  <exclude>org.apache.directory.server:*</exclude>
                  <exclude>org.apache.directory.api:*</exclude>
                  <exclude>org.apache.logging.log4j:*</exclude>
                  <exclude>org.slf4j:*</exclude>
                  <exclude>com.aliyun:*</exclude>
                  <exclude>com.aliyun.openservices:*</exclude>
                  <exclude>org.apache.orc:*</exclude>
                  <exclude>com.alibaba.niagara:*</exclude>
                  <exclude>org.apache.ant:*</exclude>
                  <exclude>org.apache.ivy:*</exclude>
                  <exclude>org.scala-lang.modules:*</exclude>
                  <exclude>org.apache.maven:*</exclude>
                  <exclude>com.alibaba.blink:*</exclude>
                  <exclude>com.data-artisans:*</exclude>
                  <exclude>com.esotericsoftware.kryo:*</exclude>
                  <exclude>com.esotericsoftware:*</exclude>
                  <exclude>com.fasterxml.jackson.core:*</exclude>
                  <exclude>com.github.scopt:*</exclude>
                  <exclude>commons-el:commons-el</exclude>
                  <exclude>commons-validator:commons-validator</exclude>
                  <exclude>com.twitter:*</exclude>
                  <exclude>com.typesafe:config</exclude>
                  <exclude>org.apache.parquet:*</exclude>
                  <exclude>org.apache.sling:org.apache.sling.commons.json</exclude>
                  <exclude>org.apache.thrift:libthrift</exclude>
                  <exclude>org.apache.avro:*</exclude>
                  <exclude>org.apache.camel:camel-core</exclude>
                  <exclued>org.antlr:*</exclued>
                  <exclued>log4j:apache-log4j-extras</exclued>
                  <exclued>io.netty:netty-all</exclued>
                  <exclued>javolution:javolution</exclued>
                  <exclued>joda-time:joda-time</exclued>
                  <exclued>net.jpountz.lz4:lz4</exclued>
                  <exclued>net.razorvine:pyrolite</exclued>
                  <exclued>net.sf.ezmorph:ezmorph</exclued>
                  <exclued>net.sf.jopt-simple:jopt-simple</exclued>
                  <exclued>net.sf.json-lib:json-lib</exclued>
                  <exclued>net.sf.opencsv:opencsv</exclued>
                  <exclued>org.iq80.snappy:snappy</exclued>
                  <exclued>org.javassist:javassist</exclued>
                  <exclude>org.spark-project.hive:*</exclude>
                  <exclude>org.rocksdb:rocksdbjni</exclude>
                </excludes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.alibaba.flink.ml</groupId>
      <artifactId>flink-ml-framework</artifactId>
      <version>0.2.1</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.alibaba.flink.ml</groupId>
      <artifactId>flink-ml-operator</artifactId>
      <version>0.2.1</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-test</artifactId>
      <version>2.7.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-math</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
