<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
  -->

<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-integration_2.12</artifactId>
    <version>3.5.6-h0.cbu.mrs.360.r18</version>
  </parent>

  <artifactId>spark-streaming-kafkaWriter-0-10_2.12-shade</artifactId>
  <properties>
    <sbt.project.name>streaming-kafkaWriter-0-10-shade</sbt.project.name>
  </properties>
  <packaging>pom</packaging>
  <name>Spark Integration for KafkaWriter 0.10 shade</name>
  <url>http://spark.apache.org/</url>

  <dependencies>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming-kafka-0-10_2.12</artifactId>
      <version>${spark.version}</version>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming-kafkaWriter-0-10_2.12</artifactId>
      <version>${spark.version}</version>
    </dependency>

  </dependencies>
  <build>
    <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
    <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <outputFile>target/spark-streaming-kafka-0-10_2.12-${project.version}.jar</outputFile>
          <minimizeJar>true</minimizeJar>
          <artifactSet>
            <includes>
              <include>org.apache.spark:spark-streaming-kafka-0-10_2.12</include>
              <include>org.apache.spark:spark-streaming-kafkaWriter-0-10_2.12</include>
            </includes>
          </artifactSet>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
