| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <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> |
| |
| <parent> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-cassandra-parent</artifactId> |
| <version>3.1.0</version> |
| </parent> |
| |
| <artifactId>flink-connector-cassandra_${scala.binary.version}</artifactId> |
| <name>Flink : Connectors : Cassandra</name> |
| |
| <packaging>jar</packaging> |
| |
| <!-- Allow users to pass custom connector versions --> |
| <properties> |
| <scala.binary.version>2.12</scala.binary.version> |
| <scala-library.version>2.12.7</scala-library.version> |
| <slf4j.version>1.7.36</slf4j.version> |
| <log4j.version>2.17.1</log4j.version> |
| <junit5.version>5.8.1</junit5.version> |
| <assertj.version>3.23.1</assertj.version> |
| <archunit.version>1.0.0</archunit.version> |
| <testcontainers.version>1.17.2</testcontainers.version> |
| <mockito.version>3.4.6</mockito.version> |
| <byte-buddy.version>1.12.10</byte-buddy.version> |
| <findbugs.version>1.3.9</findbugs.version> |
| |
| <!--driver 3.x works with 3.x and 4.x versions of Cassandra but driver 4.x is a complete refactoring with different API--> |
| <driver.version>3.11.2</driver.version> |
| <guava.version>19.0</guava.version> |
| </properties> |
| |
| <dependencies> |
| |
| <!-- Core --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java</artifactId> |
| <version>${flink.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-scala_${scala.binary.version}</artifactId> |
| <version>${flink.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-base</artifactId> |
| <version>${flink.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.scala-lang</groupId> |
| <artifactId>scala-library</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-table-api-java-bridge</artifactId> |
| <version>${flink.version}</version> |
| <scope>provided</scope> |
| <optional>true</optional> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| <version>${log4j.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <!-- Cassandra dependencies --> |
| |
| <!--Using datastax provided shaded driver which includes relocated netty--> |
| <!--https://docs.datastax.com/en/developer/java-driver/3.1/manual/shaded_jar/--> |
| <dependency> |
| <groupId>com.datastax.cassandra</groupId> |
| <artifactId>cassandra-driver-core</artifactId> |
| <version>${driver.version}</version> |
| <classifier>shaded</classifier> |
| <exclusions> |
| <!--Because the shaded JAR uses netty original POM, we still need to exclude netty explicitly--> |
| <exclusion> |
| <groupId>io.netty</groupId> |
| <artifactId>*</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.slf4j</groupId> |
| <artifactId>log4j-over-slf4j</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-classic</artifactId> |
| </exclusion> |
| <!--The next 3 are optional dependencies and are unused--> |
| <exclusion> |
| <groupId>com.github.jnr</groupId> |
| <artifactId>jnr-ffi</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>com.github.jnr</groupId> |
| <artifactId>jnr-posix</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-databind</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| |
| <dependency> |
| <groupId>com.datastax.cassandra</groupId> |
| <artifactId>cassandra-driver-mapping</artifactId> |
| <version>${driver.version}</version> |
| <exclusions> |
| <!--use the shaded driver above--> |
| <exclusion> |
| <groupId>com.datastax.cassandra</groupId> |
| <artifactId>cassandra-driver-core</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.slf4j</groupId> |
| <artifactId>log4j-over-slf4j</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-classic</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| |
| <!-- guava already surfaces in the API of cassandra driver so we can use the unshaded one --> |
| <dependency> |
| <groupId>com.google.guava</groupId> |
| <artifactId>guava</artifactId> |
| <version>${guava.version}</version> |
| </dependency> |
| |
| <!-- Logging API --> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <!-- 'javax.annotation' classes like '@Nullable' --> |
| <dependency> |
| <groupId>com.google.code.findbugs</groupId> |
| <artifactId>jsr305</artifactId> |
| <version>${findbugs.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <!-- Test dependencies --> |
| <dependency> |
| <groupId>org.junit.jupiter</groupId> |
| <artifactId>junit-jupiter</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.assertj</groupId> |
| <artifactId>assertj-core</artifactId> |
| <version>${assertj.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-core</artifactId> |
| <version>${mockito.version}</version> |
| <type>jar</type> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.testcontainers</groupId> |
| <artifactId>junit-jupiter</artifactId> |
| <version>${testcontainers.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>net.bytebuddy</groupId> |
| <artifactId>byte-buddy</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-slf4j-impl</artifactId> |
| <version>${log4j.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>${log4j.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-test-utils-junit</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.testcontainers</groupId> |
| <artifactId>cassandra</artifactId> |
| <version>${testcontainers.version}</version> |
| <scope>test</scope> |
| <!-- For dependency convergence to avoid forcing all the conflicting versions |
| of cassandra-driver-core transitive dependencies --> |
| <exclusions> |
| <exclusion> |
| <groupId>com.datastax.cassandra</groupId> |
| <artifactId>cassandra-driver-core</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| <type>test-jar</type> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-test-utils</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-test-utils</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-table-test-utils</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- ArchUit test dependencies --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-architecture-tests-test</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-architecture-tests-production</artifactId> |
| <version>${flink.version}</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <dependencyManagement> |
| <dependencies> |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.junit</groupId> |
| <artifactId>junit-bom</artifactId> |
| <version>${junit5.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>net.bytebuddy</groupId> |
| <artifactId>byte-buddy</artifactId> |
| <version>${byte-buddy.version}</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>com.esotericsoftware.kryo</groupId> |
| <artifactId>kryo</artifactId> |
| <version>2.24.0</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.scala-lang</groupId> |
| <artifactId>scala-library</artifactId> |
| <version>${scala-library.version}</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>${slf4j.version}</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.objenesis</groupId> |
| <artifactId>objenesis</artifactId> |
| <version>2.6</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.junit.jupiter</groupId> |
| <artifactId>junit-jupiter-api</artifactId> |
| <version>5.8.2</version> |
| </dependency> |
| |
| <!-- For dependency convergence --> |
| <dependency> |
| <groupId>org.junit.platform</groupId> |
| <artifactId>junit-platform-commons</artifactId> |
| <version>1.8.2</version> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>shade-flink</id> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <!-- This is necessary because we bundle a subset of our dependencies, |
| and transitive dependencies of that subset should still be pulled into the user jar.--> |
| <promoteTransitiveDependencies>true</promoteTransitiveDependencies> |
| <artifactSet> |
| <includes> |
| <include>com.datastax.cassandra:cassandra-driver-core:shaded</include> |
| <include>com.datastax.cassandra:cassandra-driver-mapping</include> |
| <include>com.google.guava:guava</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> |
| </relocations> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |