Skip to content

Commit

Permalink
[FLINK-28203][build] Mark bundled dependencies as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed May 12, 2023
1 parent edf5666 commit 49dcdf0
Show file tree
Hide file tree
Showing 42 changed files with 158 additions and 7 deletions.
1 change: 1 addition & 0 deletions flink-connectors/flink-connector-files/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
Expand Down
6 changes: 6 additions & 0 deletions flink-connectors/flink-connector-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-compatibility_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-bulk</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
Expand All @@ -252,6 +254,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-orc</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>org.apache.orc</groupId>
Expand All @@ -264,6 +267,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-orc-nohive</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>org.apache.orc</groupId>
Expand All @@ -276,6 +280,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-parquet</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- File systems -->
Expand All @@ -284,6 +289,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-fs</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- Hadoop -->
Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-sql-connector-hbase-1.4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hbase-1.4</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
</dependencies>

Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-sql-connector-hbase-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hbase-2.2</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
</dependencies>

Expand Down
3 changes: 3 additions & 0 deletions flink-connectors/flink-sql-connector-hive-2.3.9/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hive_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>2.3.9</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand Down Expand Up @@ -82,6 +84,7 @@ under the License.
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.5.2</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
</dependencies>

Expand Down
6 changes: 6 additions & 0 deletions flink-connectors/flink-sql-connector-hive-3.1.3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hive_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>3.1.3</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand Down Expand Up @@ -82,6 +84,7 @@ under the License.
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.5.2</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- hadoop dependency to make the copied code compile -->
Expand Down Expand Up @@ -122,20 +125,23 @@ under the License.
<groupId>org.apache.thrift</groupId>
<artifactId>libfb303</artifactId>
<version>0.9.3</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- avro is included in hive-exec. we use the same dependencies but with a different version -->
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.8.2</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-mapred</artifactId>
<classifier>hadoop2</classifier>
<version>1.8.2</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
Expand Down
1 change: 1 addition & 0 deletions flink-connectors/flink-sql-connector-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
2 changes: 2 additions & 0 deletions flink-dist-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<!-- transitive Flink dependencies are provided at runtime -->
Expand All @@ -52,6 +53,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<!-- transitive Flink dependencies are provided at runtime -->
Expand Down
34 changes: 34 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,84 +51,98 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime-web</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-optimizer</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-metrics-core</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-container</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-statebackend-rocksdb</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-statebackend-changelog</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-dstl-dfs</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-kubernetes</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-yarn</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
Expand All @@ -141,6 +155,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- Default file system support. The Hadoop dependency -->
Expand All @@ -150,6 +165,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-fs</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- Concrete logging framework - we add this only here (and not in the
Expand Down Expand Up @@ -454,6 +470,18 @@ under the License.
<!-- this entry exists to prevent a compile dependency from slipping through -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<!-- test dependencies -->

Expand All @@ -480,6 +508,12 @@ under the License.
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>2.1</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-streaming</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>
</dependencies>

Expand Down
3 changes: 3 additions & 0 deletions flink-filesystems/flink-azure-fs-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,21 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-fs</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-fs-hadoop-shaded</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-azure</artifactId>
<version>${fs.hadoopshaded.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
Expand Down
1 change: 1 addition & 0 deletions flink-filesystems/flink-fs-hadoop-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ under the License.
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${fs.hadoopshaded.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<exclusion>
<groupId>jdk.tools</groupId>
Expand Down
4 changes: 4 additions & 0 deletions flink-filesystems/flink-gs-fs-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ under the License.
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-fs</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-fs-hadoop-shaded</artifactId>
<version>${project.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
</dependency>

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>${fs.gs.sdk.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<!-- the following conflict with flink-fs-hadoop-shaded so exclude here -->
<exclusion>
Expand Down Expand Up @@ -99,6 +102,7 @@ under the License.
<groupId>com.google.cloud.bigdataoss</groupId>
<artifactId>gcs-connector</artifactId>
<version>${fs.gs.connector.version}</version>
<optional>${flink.markBundledAsOptional}</optional>
<exclusions>
<!-- the following conflict with flink-fs-hadoop-shaded so exclude here -->
<exclusion>
Expand Down
Loading

0 comments on commit 49dcdf0

Please sign in to comment.