| <?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-parent</artifactId> | |
| <version>2.4-SNAPSHOT</version> | |
| </parent> | |
| <artifactId>flink-python</artifactId> | |
| <name>Flink : Python</name> | |
| <packaging>jar</packaging> | |
| <properties> | |
| <!-- Override Beam's optional transitive with a version that fixes CVE-2026-45292. --> | |
| <opentelemetry.bundled.version>1.62.0</opentelemetry.bundled.version> | |
| <!-- Arrow Java is released from apache/arrow-java and is not version-aligned with pyarrow. --> | |
| <arrow.version>19.0.0</arrow.version> | |
| <surefire.module.config><!-- | |
| CommonTestUtils#setEnv | |
| -->--add-opens=java.base/java.util=ALL-UNNAMED <!-- | |
| Kryo AtomicBoolean | |
| -->--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED <!-- | |
| Arrow MemoryUtil | |
| -->--add-opens=java.base/java.nio=ALL-UNNAMED <!-- | |
| ArrowReaderWriterTest | |
| -->--sun-misc-unsafe-memory-access=allow <!-- | |
| -->--enable-native-access=ALL-UNNAMED <!-- | |
| -->-Dio.netty.tryReflectionSetAccessible=true | |
| </surefire.module.config> | |
| </properties> | |
| <dependencies> | |
| <!-- core dependencies --> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-core</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-clients</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-streaming-java</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-table-common</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-table-runtime</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-files</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-csv</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-avro</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-json</artifactId> | |
| <version>${project.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <!-- Beam dependencies --> | |
| <dependency> | |
| <groupId>org.apache.beam</groupId> | |
| <artifactId>beam-runners-java-fn-execution</artifactId> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.apache.beam</groupId> | |
| <artifactId>beam-vendor-bytebuddy-1_10_8</artifactId> | |
| </exclusion> | |
| <exclusion> | |
| <groupId>com.google.errorprone</groupId> | |
| <artifactId>error_prone_annotations</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.beam</groupId> | |
| <artifactId>beam-runners-core-java</artifactId> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <!-- Declared optional by Beam; required at runtime for PipelineOptionsFactory. --> | |
| <dependency> | |
| <groupId>io.opentelemetry</groupId> | |
| <artifactId>opentelemetry-api</artifactId> | |
| <version>${opentelemetry.bundled.version}</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.opentelemetry</groupId> | |
| <artifactId>opentelemetry-context</artifactId> | |
| <version>${opentelemetry.bundled.version}</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <!-- PemJa dependencies --> | |
| <dependency> | |
| <groupId>com.alibaba</groupId> | |
| <artifactId>pemja</artifactId> | |
| <version>0.6.3</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <!-- Protobuf dependencies --> | |
| <dependency> | |
| <groupId>com.google.protobuf</groupId> | |
| <artifactId>protobuf-java</artifactId> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <!-- Python API dependencies --> | |
| <dependency> | |
| <groupId>net.sf.py4j</groupId> | |
| <artifactId>py4j</artifactId> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <dependency> | |
| <groupId>net.razorvine</groupId> | |
| <artifactId>pyrolite</artifactId> | |
| <version>4.13</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>net.razorvine</groupId> | |
| <artifactId>serpent</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <!-- Arrow dependencies --> | |
| <dependency> | |
| <groupId>org.apache.arrow</groupId> | |
| <artifactId>arrow-vector</artifactId> | |
| <version>${arrow.version}</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>commons-codec</groupId> | |
| <artifactId>commons-codec</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.arrow</groupId> | |
| <artifactId>arrow-memory-netty</artifactId> | |
| <version>${arrow.version}</version> | |
| <optional>${flink.markBundledAsOptional}</optional> | |
| </dependency> | |
| <!-- test dependencies --> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-core</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-test-utils</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| <exclusions> | |
| <exclusion> | |
| <!-- for dependency convergence --> | |
| <groupId>org.apache.curator</groupId> | |
| <artifactId>curator-test</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-runtime</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-table-planner_${scala.binary.version}</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-streaming-java</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-table-runtime</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-table-planner_${scala.binary.version}</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-test-utils-junit</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-test-utils</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-avro</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-parquet</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-orc</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-kafka</artifactId> | |
| <version>5.0.0-2.2</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-elasticsearch7</artifactId> | |
| <version>3.0.0-1.16</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-pulsar</artifactId> | |
| <version>4.0.0-1.17</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-rabbitmq</artifactId> | |
| <version>3.0.0-1.16</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-kinesis</artifactId> | |
| <version>4.0.0-1.16</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-aws-kinesis-firehose</artifactId> | |
| <version>4.0.0-1.16</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-jdbc</artifactId> | |
| <version>3.1.1-1.17</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-cassandra_${scala.binary.version}</artifactId> | |
| <version>3.0.0-1.16</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-statebackend-rocksdb</artifactId> | |
| <version>${project.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <!-- Indirectly accessed in pyflink_gateway_server --> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-statebackend-rocksdb</artifactId> | |
| <version>${project.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-io</groupId> | |
| <artifactId>commons-io</artifactId> | |
| <version>${commons.io.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.commons</groupId> | |
| <artifactId>commons-lang3</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.datatype</groupId> | |
| <artifactId>jackson-datatype-jdk8</artifactId> | |
| <version>${jackson-bom.version}</version> | |
| </dependency> | |
| </dependencies> | |
| <dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>net.sf.py4j</groupId> | |
| <artifactId>py4j</artifactId> | |
| <version>${py4j.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.beam</groupId> | |
| <artifactId>beam-runners-java-fn-execution</artifactId> | |
| <version>${beam.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.beam</groupId> | |
| <artifactId>beam-runners-core-java</artifactId> | |
| <version>${beam.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.protobuf</groupId> | |
| <artifactId>protobuf-java</artifactId> | |
| <version>${protoc.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.conscrypt</groupId> | |
| <artifactId>conscrypt-openjdk-uber</artifactId> | |
| <version>2.5.1</version> | |
| <scope>runtime</scope> | |
| </dependency> | |
| </dependencies> | |
| </dependencyManagement> | |
| <build> | |
| <resources> | |
| <resource> | |
| <directory>src/main/resources</directory> | |
| </resource> | |
| </resources> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-antrun-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <id>clean</id> | |
| <phase>clean</phase> | |
| <goals> | |
| <goal>run</goal> | |
| </goals> | |
| <configuration> | |
| <target> | |
| <delete includeEmptyDirs="true"> | |
| <fileset dir="${project.basedir}/pyflink" | |
| includes="**/*.pyc,**/__pycache__"/> | |
| <fileset dir="${project.basedir}/pyflink"> | |
| <and> | |
| <size value="0"/> | |
| <type type="dir"/> | |
| </and> | |
| </fileset> | |
| </delete> | |
| <delete file="${project.basedir}/lib/pyflink.zip"/> | |
| <delete dir="${project.basedir}/target"/> | |
| <delete dir="${project.basedir}/build"/> | |
| <delete dir="${project.basedir}/apache-flink-libraries/build"/> | |
| <delete dir="${project.basedir}/apache_flink.egg-info"/> | |
| <delete | |
| dir="${project.basedir}/apache-flink-libraries/apache_flink_libraries.egg-info"/> | |
| </target> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>generate-resources</id> | |
| <phase>generate-resources</phase> | |
| <goals> | |
| <goal>run</goal> | |
| </goals> | |
| <configuration> | |
| <target> | |
| <delete includeEmptyDirs="true"> | |
| <fileset dir="${project.basedir}/pyflink" | |
| includes="**/*.pyc,**/__pycache__"/> | |
| <fileset dir="${project.basedir}/pyflink"> | |
| <and> | |
| <size value="0"/> | |
| <type type="dir"/> | |
| </and> | |
| </fileset> | |
| </delete> | |
| <delete file="${project.basedir}/lib/pyflink.zip"/> | |
| <zip destfile="${project.basedir}/lib/pyflink.zip"> | |
| <fileset dir="${project.basedir}" | |
| includes="pyflink/**/*"/> | |
| </zip> | |
| </target> | |
| </configuration> | |
| </execution> | |
| <execution> | |
| <id>build-test-jars</id> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>run</goal> | |
| </goals> | |
| <configuration> | |
| <target> | |
| <jar destfile="${project.build.directory}/artifacts/testUdf1.jar" | |
| basedir="${project.build.directory}/test-classes" | |
| includes="**/TestScalarFunction1.class"/> | |
| <jar destfile="${project.build.directory}/artifacts/testUdf2.jar" | |
| basedir="${project.build.directory}/test-classes" | |
| includes="**/TestScalarFunction2.class"/> | |
| <jar destfile="${project.build.directory}/artifacts/testJavaDdl.jar" | |
| basedir="${project.build.directory}/test-classes" | |
| includes="**/PythonFunctionFactoryTest.class"/> | |
| <jar | |
| destfile="${project.build.directory}/artifacts/testDataStream.jar" | |
| basedir="${project.build.directory}/test-classes" | |
| includes="**/DataStreamTestCollectSink.class,**/MyCustomSourceFunction.class,**/PartitionCustomTestMapFunction.class"/> | |
| <jar destfile="${project.build.directory}/artifacts/dummy.jar" | |
| basedir="${project.build.directory}/test-classes" | |
| includes="**/TestJob.class"> | |
| <manifest> | |
| <attribute name="Main-Class" | |
| value="org.apache.flink.client.cli.TestJob"/> | |
| </manifest> | |
| </jar> | |
| </target> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>copy</goal> | |
| </goals> | |
| <configuration> | |
| <artifactItems> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-runtime</artifactId> | |
| <!-- Don't use test-jar type because of a bug in the plugin (MDEP-587). --> | |
| <classifier>tests</classifier> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-streaming-java</artifactId> | |
| <!-- Don't use test-jar type because of a bug in the plugin (MDEP-587). --> | |
| <classifier>tests</classifier> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-avro</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-parquet</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-orc</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-json</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-kafka</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-elasticsearch7</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-pulsar</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-rabbitmq</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-kinesis</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-sql-connector-aws-kinesis-firehose | |
| </artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-jdbc</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-files</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-cassandra_${scala.binary.version} | |
| </artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-statebackend-rocksdb</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-statebackend-rocksdb</artifactId> | |
| <!-- Don't use test-jar type because of a bug in the plugin (MDEP-587). --> | |
| <classifier>tests</classifier> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-connector-test-utils</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-test-utils</artifactId> | |
| </artifactItem> | |
| <artifactItem> | |
| <groupId>org.apache.flink</groupId> | |
| <artifactId>flink-test-utils-junit</artifactId> | |
| </artifactItem> | |
| </artifactItems> | |
| <outputDirectory>${project.build.directory}/test-dependencies | |
| </outputDirectory> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <id>copy-dependencies</id> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>copy-dependencies</goal> | |
| </goals> | |
| <configuration> | |
| <includeGroupIds>junit</includeGroupIds> | |
| <outputDirectory>${project.build.directory}/test-dependencies | |
| </outputDirectory> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <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> | |
| <artifactSet> | |
| <includes combine.children="append"> | |
| <include>net.razorvine:*</include> | |
| <include>net.sf.py4j:*</include> | |
| <include>org.apache.beam:*</include> | |
| <include>io.opentelemetry:*</include> | |
| <include>com.fasterxml.jackson.core:*</include> | |
| <include>joda-time:*</include> | |
| <include>com.google.protobuf:*</include> | |
| <include>org.apache.arrow:*</include> | |
| <include>io.netty:*</include> | |
| <include>com.google.flatbuffers:*</include> | |
| <include>com.alibaba:pemja</include> | |
| </includes> | |
| </artifactSet> | |
| <filters> | |
| <filter> | |
| <artifact>org.apache.beam:beam-sdks-java-core</artifact> | |
| <excludes> | |
| <exclude>org/apache/beam/repackaged/core/org/antlr/** | |
| </exclude> | |
| <exclude> | |
| org/apache/beam/repackaged/core/org/apache/commons/compress/** | |
| </exclude> | |
| <exclude> | |
| org/apache/beam/repackaged/core/org/apache/commons/lang3/** | |
| </exclude> | |
| </excludes> | |
| </filter> | |
| <filter> | |
| <artifact>org.apache.beam:beam-vendor-grpc-1_43_2</artifact> | |
| <excludes> | |
| <exclude>org/apache/beam/vendor/grpc/v1p43p2/org/jboss/** | |
| </exclude> | |
| <exclude>schema/**</exclude> | |
| <exclude> | |
| org/apache/beam/vendor/grpc/v1p43p2/org/eclipse/jetty/** | |
| </exclude> | |
| </excludes> | |
| </filter> | |
| <filter> | |
| <artifact>*:*</artifact> | |
| <excludes> | |
| <exclude>LICENSE-junit.txt</exclude> | |
| <exclude>LICENSE.txt</exclude> | |
| <exclude>LICENSE</exclude> | |
| <exclude>META-INF/LICENSE.txt</exclude> | |
| <exclude>*.proto</exclude> | |
| <!-- Drop stale JPMS descriptors from relocated multi-release jars (e.g. jackson, netty) --> | |
| <exclude>META-INF/**/module-info.class</exclude> | |
| </excludes> | |
| </filter> | |
| </filters> | |
| <relocations combine.children="append"> | |
| <relocation> | |
| <pattern>py4j</pattern> | |
| <shadedPattern>org.apache.flink.api.python.shaded.py4j | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>net.razorvine</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.net.razorvine | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>com.fasterxml.jackson</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.com.fasterxml.jackson | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>io.opentelemetry</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.io.opentelemetry | |
| </shadedPattern> | |
| </relocation> | |
| <!-- | |
| Manually relocate multi-release classes to the correct shaded package. This is needed | |
| due to a bug in the Maven Shade plugin, which only relocates the content but not | |
| the package structure itself, see https://github.com/apache/maven-shade-plugin/issues/652 | |
| --> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/com/fasterxml/jackson/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/com/fasterxml/jackson/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <!-- | |
| Same maven-shade-plugin#652 workaround as the jackson relocation above, extended to every | |
| relocated package: keep each dependency's multi-release (META-INF/versions/N) classes aligned | |
| with its relocated base classes. No-op for non-multi-release jars. | |
| --> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/py4j/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/py4j/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/net/razorvine/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/net/razorvine/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/org/joda/time/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/org/joda/time/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/com/google/protobuf/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/com/google/protobuf/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/org/apache/arrow/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/org/apache/arrow/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/io/netty/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/io/netty/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/io/opentelemetry/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/io/opentelemetry/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/com/google/flatbuffers/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/api/python/shaded/com/google/flatbuffers/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>META-INF/versions/(\d+)/org/apache/avro/</pattern> | |
| <shadedPattern>META-INF/versions/$1/org/apache/flink/avro/shaded/org/apache/avro/</shadedPattern> | |
| <rawString>true</rawString> | |
| </relocation> | |
| <relocation> | |
| <pattern>org.joda.time</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.org.joda.time | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>com.google.protobuf</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.com.google.protobuf | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>org.apache.arrow</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.org.apache.arrow | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>io.netty</pattern> | |
| <shadedPattern>org.apache.flink.api.python.shaded.io.netty | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>com.google.flatbuffers</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.com.google.flatbuffers | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>com.google.protobuf</pattern> | |
| <shadedPattern> | |
| org.apache.flink.api.python.shaded.com.google.protobuf | |
| </shadedPattern> | |
| </relocation> | |
| <relocation> | |
| <pattern>org.apache.avro</pattern> | |
| <shadedPattern>org.apache.flink.avro.shaded.org.apache.avro | |
| </shadedPattern> | |
| </relocation> | |
| </relocations> | |
| <transformers combine.children="append"> | |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | |
| <manifestEntries> | |
| <Multi-Release>true</Multi-Release> | |
| </manifestEntries> | |
| </transformer> | |
| </transformers> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>io.github.ascopes</groupId> | |
| <artifactId>protobuf-maven-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>generate</goal> | |
| </goals> | |
| <configuration> | |
| <sourceDirectories> | |
| <sourceDirectory>${project.basedir}/pyflink/proto</sourceDirectory> | |
| </sourceDirectories> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <configuration> | |
| <systemPropertyVariables> | |
| <!-- Arrow requires the property io.netty.tryReflectionSetAccessible to | |
| be set to true for JDK >= 9. Please refer to ARROW-5412 for more details. --> | |
| <io.netty.tryReflectionSetAccessible>true | |
| </io.netty.tryReflectionSetAccessible> | |
| </systemPropertyVariables> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-jar-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <id>test-jar</id> | |
| <goals> | |
| <goal>test-jar</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </project> |