<?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-connectors</artifactId>
    <groupId>org.apache.flink</groupId>
    <version>1.5.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>flink-connector-cassandra_2.11</artifactId>
  <name>flink-connector-cassandra</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <reuseForks>true</reuseForks>
          <forkCount>1</forkCount>
          <argLine>-Xms256m -Xmx2800m -Dmvn.forkNumber=${surefire.forkNumber} -XX:-UseGCOverheadLimit</argLine>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <id>shade-flink</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <artifactSet>
                <includes>
                  <include>com.datastax.cassandra:cassandra-driver-core</include>
                  <include>com.datastax.cassandra:cassandra-driver-mapping</include>
                  <include>com.google.guava:guava</include>
                  <include>io.netty:netty-*</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>org.apache.flink.cassandra.shaded.com.google</shadedPattern>
                  <excludes>
                    <exclude>com.google.protobuf.**</exclude>
                    <exclude>com.google.inject.**</exclude>
                  </excludes>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>com.datastax.shaded.netty</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>io.dropwizard.metrics</groupId>
      <artifactId>metrics-core</artifactId>
      <version>3.1.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>force-shading</artifactId>
      <version>1.5.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <properties>
    <driver.version>3.0.0</driver.version>
    <cassandra.version>2.2.5</cassandra.version>
  </properties>
</project>

