| <?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/xsd/maven-4.0.0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <artifactId>flink-connectors</artifactId> |
| <groupId>org.apache.flink</groupId> |
| <version>1.14-SNAPSHOT</version> |
| <relativePath>..</relativePath> |
| </parent> |
| |
| <artifactId>flink-connector-pulsar_${scala.binary.version}</artifactId> |
| <name>Flink : Connectors : Pulsar</name> |
| |
| <packaging>jar</packaging> |
| |
| <properties> |
| <pulsar.version>2.8.0</pulsar.version> |
| |
| <!-- Test Libraries --> |
| <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version> |
| <assertj-core.version>3.20.2</assertj-core.version> |
| <commons-lang3.version>3.11</commons-lang3.version> |
| <grpc.version>1.33.0</grpc.version> |
| </properties> |
| |
| <dependencies> |
| |
| <!-- Core --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-base</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| |
| <!-- Connectors --> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <!-- Protobuf & Protobuf Native Schema support. Add it to your pom if you need protobuf --> |
| |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java</artifactId> |
| <version>${protoc.version}</version> |
| <scope>provided</scope> |
| <optional>true</optional> |
| </dependency> |
| |
| <!-- Tests --> |
| |
| <dependency> |
| <groupId>org.assertj</groupId> |
| <artifactId>assertj-core</artifactId> |
| <version>${assertj-core.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-core</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| <type>test-jar</type> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-java_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| <type>test-jar</type> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-tests</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-testing_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-connector-test-utils</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- Pulsar testing environment --> |
| |
| <dependency> |
| <groupId>org.testcontainers</groupId> |
| <artifactId>pulsar</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- Pulsar bundles the latest bookkeeper & zookeeper, --> |
| <!-- we don't override the version here. --> |
| <dependency> |
| <groupId>org.apache.pulsar</groupId> |
| <artifactId>testmocks</artifactId> |
| <version>${pulsar.version}</version> |
| <scope>test</scope> |
| <exclusions> |
| <exclusion> |
| <groupId>org.testng</groupId> |
| <artifactId>testng</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.powermock</groupId> |
| <artifactId>powermock-module-testng</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.pulsar</groupId> |
| <artifactId>pulsar-broker</artifactId> |
| <version>${pulsar.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <!-- Pulsar use a newer commons-lang3 in broker. --> |
| <!-- Bump the version only for testing. --> |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-lang3</artifactId> |
| <version>${commons-lang3.version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- Add Pulsar 2.x as a dependency. --> |
| <!-- Move this to button for avoiding class conflicts with pulsar-broker. --> |
| |
| <dependency> |
| <groupId>org.apache.pulsar</groupId> |
| <artifactId>pulsar-client-all</artifactId> |
| <version>${pulsar.version}</version> |
| </dependency> |
| </dependencies> |
| |
| <!-- gRPC use version range which don't support by flink ci. --> |
| <dependencyManagement> |
| <dependencies> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-bom</artifactId> |
| <version>${grpc.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <build> |
| <extensions> |
| <extension> |
| <groupId>kr.motd.maven</groupId> |
| <artifactId>os-maven-plugin</artifactId> |
| <version>1.7.0</version> |
| </extension> |
| </extensions> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <!-- Enforce single fork execution due to heavy mini cluster use in the tests --> |
| <forkCount>1</forkCount> |
| <argLine>-Xms256m -Xmx2048m -Dmvn.forkNumber=${surefire.forkNumber} |
| -XX:-UseGCOverheadLimit |
| </argLine> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>${protobuf-maven-plugin.version}</version> |
| <extensions>true</extensions> |
| <configuration> |
| <!-- Currently Flink azure test pipeline would first pre-compile and then upload the compiled |
| directory, then it download the directory and run the corresponding tests. However, the protoc |
| executable under the target directory would lost the execution permission bit after downloading. |
| To solve this issue we would skip generating the target files if they already exist after |
| downloading. Meanwhile, since the time might be not consistent between the pre-compile and |
| the actual execution, we need to adjust the timestamp manually, see unpack_build_artifact.sh--> |
| <checkStaleness>true</checkStaleness> |
| <protoTestSourceRoot>${project.basedir}/src/test/resources/protobuf |
| </protoTestSourceRoot> |
| <!-- Generates classes into a separate directory since the generator always removes existing files. --> |
| <outputDirectory> |
| ${project.build.directory}/generated-test-sources/protobuf/java |
| </outputDirectory> |
| <protocArtifact>com.google.protobuf:protoc:3.5.1:exe:${os.detected.classifier} |
| </protocArtifact> |
| </configuration> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>test-compile</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Adding protobuf generated classes to test build path --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-test-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-test-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source> |
| ${project.build.directory}/generated-test-sources/protobuf/java |
| </source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |