diff --git a/flink-connectors/flink-connector-files/pom.xml b/flink-connectors/flink-connector-files/pom.xml
index d82646e0af86e..22931f2094567 100644
--- a/flink-connectors/flink-connector-files/pom.xml
+++ b/flink-connectors/flink-connector-files/pom.xml
@@ -55,6 +55,7 @@ under the License.
org.apache.flink
flink-connector-base
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-connectors/flink-connector-hive/pom.xml b/flink-connectors/flink-connector-hive/pom.xml
index 80011b55b979f..5a5df8fd3c401 100644
--- a/flink-connectors/flink-connector-hive/pom.xml
+++ b/flink-connectors/flink-connector-hive/pom.xml
@@ -232,12 +232,14 @@ under the License.
org.apache.flink
flink-hadoop-compatibility_${scala.binary.version}
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-hadoop-bulk
${project.version}
+ ${flink.markBundledAsOptional}
@@ -252,6 +254,7 @@ under the License.
org.apache.flink
flink-orc
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.orc
@@ -264,6 +267,7 @@ under the License.
org.apache.flink
flink-orc-nohive
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.orc
@@ -276,6 +280,7 @@ under the License.
org.apache.flink
flink-parquet
${project.version}
+ ${flink.markBundledAsOptional}
@@ -284,6 +289,7 @@ under the License.
org.apache.flink
flink-hadoop-fs
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-connectors/flink-sql-connector-hbase-1.4/pom.xml b/flink-connectors/flink-sql-connector-hbase-1.4/pom.xml
index 6a39a9136a369..effb92f080725 100644
--- a/flink-connectors/flink-sql-connector-hbase-1.4/pom.xml
+++ b/flink-connectors/flink-sql-connector-hbase-1.4/pom.xml
@@ -41,6 +41,7 @@ under the License.
org.apache.flink
flink-connector-hbase-1.4
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-connectors/flink-sql-connector-hbase-2.2/pom.xml b/flink-connectors/flink-sql-connector-hbase-2.2/pom.xml
index d0722a57fdeb6..fb29cc28674b1 100644
--- a/flink-connectors/flink-sql-connector-hbase-2.2/pom.xml
+++ b/flink-connectors/flink-sql-connector-hbase-2.2/pom.xml
@@ -41,6 +41,7 @@ under the License.
org.apache.flink
flink-connector-hbase-2.2
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-connectors/flink-sql-connector-hive-2.3.9/pom.xml b/flink-connectors/flink-sql-connector-hive-2.3.9/pom.xml
index a8135e0a81831..ed986f6d15090 100644
--- a/flink-connectors/flink-sql-connector-hive-2.3.9/pom.xml
+++ b/flink-connectors/flink-sql-connector-hive-2.3.9/pom.xml
@@ -43,12 +43,14 @@ under the License.
org.apache.flink
flink-connector-hive_${scala.binary.version}
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.hive
hive-exec
2.3.9
+ ${flink.markBundledAsOptional}
log4j
@@ -82,6 +84,7 @@ under the License.
org.antlr
antlr-runtime
3.5.2
+ ${flink.markBundledAsOptional}
diff --git a/flink-connectors/flink-sql-connector-hive-3.1.3/pom.xml b/flink-connectors/flink-sql-connector-hive-3.1.3/pom.xml
index e7d932d2d2c37..4b8280cf83961 100644
--- a/flink-connectors/flink-sql-connector-hive-3.1.3/pom.xml
+++ b/flink-connectors/flink-sql-connector-hive-3.1.3/pom.xml
@@ -43,12 +43,14 @@ under the License.
org.apache.flink
flink-connector-hive_${scala.binary.version}
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.hive
hive-exec
3.1.3
+ ${flink.markBundledAsOptional}
log4j
@@ -82,6 +84,7 @@ under the License.
org.antlr
antlr-runtime
3.5.2
+ ${flink.markBundledAsOptional}
@@ -122,6 +125,7 @@ under the License.
org.apache.thrift
libfb303
0.9.3
+ ${flink.markBundledAsOptional}
@@ -129,6 +133,7 @@ under the License.
org.apache.avro
avro
1.8.2
+ ${flink.markBundledAsOptional}
@@ -136,6 +141,7 @@ under the License.
avro-mapred
hadoop2
1.8.2
+ ${flink.markBundledAsOptional}
org.mortbay.jetty
diff --git a/flink-connectors/flink-sql-connector-kafka/pom.xml b/flink-connectors/flink-sql-connector-kafka/pom.xml
index a8768a61907d8..edfdb6717c9ec 100644
--- a/flink-connectors/flink-sql-connector-kafka/pom.xml
+++ b/flink-connectors/flink-sql-connector-kafka/pom.xml
@@ -43,6 +43,7 @@ under the License.
org.apache.flink
flink-connector-kafka
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
diff --git a/flink-dist-scala/pom.xml b/flink-dist-scala/pom.xml
index a01a23a08d2e1..d6bec0c71c413 100644
--- a/flink-dist-scala/pom.xml
+++ b/flink-dist-scala/pom.xml
@@ -40,6 +40,7 @@ under the License.
org.apache.flink
flink-scala_${scala.binary.version}
${project.version}
+ ${flink.markBundledAsOptional}
@@ -52,6 +53,7 @@ under the License.
org.apache.flink
flink-streaming-scala_${scala.binary.version}
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml
index 89b80f1a5f438..84219b323e7ba 100644
--- a/flink-dist/pom.xml
+++ b/flink-dist/pom.xml
@@ -51,84 +51,98 @@ under the License.
org.apache.flink
flink-core
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-java
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-runtime
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-runtime-web
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-optimizer
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-clients
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-streaming-java
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-metrics-core
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-container
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-statebackend-rocksdb
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-statebackend-changelog
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-dstl-dfs
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-kubernetes
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-yarn
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.hadoop
@@ -141,6 +155,7 @@ under the License.
org.apache.flink
flink-connector-base
${project.version}
+ ${flink.markBundledAsOptional}
@@ -150,6 +165,7 @@ under the License.
org.apache.flink
flink-hadoop-fs
${project.version}
+ ${flink.markBundledAsOptional}
provided
+
+ org.slf4j
+ slf4j-api
+ ${slf4j.version}
+ ${flink.markBundledAsOptional}
+
+
+ com.google.code.findbugs
+ jsr305
+ 1.3.9
+ ${flink.markBundledAsOptional}
+
@@ -480,6 +508,12 @@ under the License.
${project.version}
provided
+
+ org.objenesis
+ objenesis
+ 2.1
+ ${flink.markBundledAsOptional}
+
diff --git a/flink-examples/flink-examples-build-helper/flink-examples-streaming-state-machine/pom.xml b/flink-examples/flink-examples-build-helper/flink-examples-streaming-state-machine/pom.xml
index e4780fd9eddf6..8b12a15c4d0be 100644
--- a/flink-examples/flink-examples-build-helper/flink-examples-streaming-state-machine/pom.xml
+++ b/flink-examples/flink-examples-build-helper/flink-examples-streaming-state-machine/pom.xml
@@ -36,6 +36,7 @@ under the License.
org.apache.flink
flink-examples-streaming
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-filesystems/flink-azure-fs-hadoop/pom.xml b/flink-filesystems/flink-azure-fs-hadoop/pom.xml
index 51ae631a5f17f..ce13333ee450b 100644
--- a/flink-filesystems/flink-azure-fs-hadoop/pom.xml
+++ b/flink-filesystems/flink-azure-fs-hadoop/pom.xml
@@ -51,18 +51,21 @@ under the License.
org.apache.flink
flink-hadoop-fs
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-fs-hadoop-shaded
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.hadoop
hadoop-azure
${fs.hadoopshaded.version}
+ ${flink.markBundledAsOptional}
org.apache.hadoop
diff --git a/flink-filesystems/flink-fs-hadoop-shaded/pom.xml b/flink-filesystems/flink-fs-hadoop-shaded/pom.xml
index c4daca5e1a560..6534045bef60f 100644
--- a/flink-filesystems/flink-fs-hadoop-shaded/pom.xml
+++ b/flink-filesystems/flink-fs-hadoop-shaded/pom.xml
@@ -52,6 +52,7 @@ under the License.
org.apache.hadoop
hadoop-common
${fs.hadoopshaded.version}
+ ${flink.markBundledAsOptional}
jdk.tools
diff --git a/flink-filesystems/flink-gs-fs-hadoop/pom.xml b/flink-filesystems/flink-gs-fs-hadoop/pom.xml
index 724501fea84b8..2563dfd341594 100644
--- a/flink-filesystems/flink-gs-fs-hadoop/pom.xml
+++ b/flink-filesystems/flink-gs-fs-hadoop/pom.xml
@@ -53,18 +53,21 @@ under the License.
org.apache.flink
flink-hadoop-fs
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-fs-hadoop-shaded
${project.version}
+ ${flink.markBundledAsOptional}
com.google.cloud
google-cloud-storage
${fs.gs.sdk.version}
+ ${flink.markBundledAsOptional}
@@ -99,6 +102,7 @@ under the License.
com.google.cloud.bigdataoss
gcs-connector
${fs.gs.connector.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-filesystems/flink-oss-fs-hadoop/pom.xml b/flink-filesystems/flink-oss-fs-hadoop/pom.xml
index 8509fde142c18..4e263e319aad3 100644
--- a/flink-filesystems/flink-oss-fs-hadoop/pom.xml
+++ b/flink-filesystems/flink-oss-fs-hadoop/pom.xml
@@ -44,18 +44,21 @@ under the License.
org.apache.flink
flink-hadoop-fs
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-fs-hadoop-shaded
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.hadoop
hadoop-aliyun
${fs.hadoopshaded.version}
+ ${flink.markBundledAsOptional}
com.aliyun.oss
@@ -81,6 +84,7 @@ under the License.
com.aliyun.oss
aliyun-sdk-oss
${fs.oss.sdk.version}
+ ${flink.markBundledAsOptional}
javax.xml.bind
diff --git a/flink-filesystems/flink-s3-fs-hadoop/pom.xml b/flink-filesystems/flink-s3-fs-hadoop/pom.xml
index 7be139b58bcb8..adcf46e5efd13 100644
--- a/flink-filesystems/flink-s3-fs-hadoop/pom.xml
+++ b/flink-filesystems/flink-s3-fs-hadoop/pom.xml
@@ -74,6 +74,7 @@ under the License.
org.apache.flink
flink-s3-fs-base
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-filesystems/flink-s3-fs-presto/pom.xml b/flink-filesystems/flink-s3-fs-presto/pom.xml
index ca62c5f90d932..05cf8b8ffde9d 100644
--- a/flink-filesystems/flink-s3-fs-presto/pom.xml
+++ b/flink-filesystems/flink-s3-fs-presto/pom.xml
@@ -45,6 +45,14 @@ under the License.
provided
+
+
+ org.apache.flink
+ flink-s3-fs-base
+ ${project.version}
+ ${flink.markBundledAsOptional}
+
+
org.apache.flink
@@ -89,18 +97,12 @@ under the License.
-
-
- org.apache.flink
- flink-s3-fs-base
- ${project.version}
-
-
com.facebook.presto
presto-hive
${presto.version}
+ ${flink.markBundledAsOptional}
@@ -317,6 +319,7 @@ under the License.
com.facebook.presto.hadoop
hadoop-apache2
2.7.4-9
+ ${flink.markBundledAsOptional}
@@ -352,6 +355,7 @@ under the License.
org.apache.hadoop
hadoop-common
${fs.hadoopshaded.version}
+ ${flink.markBundledAsOptional}
jdk.tools
@@ -379,6 +383,7 @@ under the License.
org.apache.hadoop
hadoop-hdfs
${fs.hadoopshaded.version}
+ ${flink.markBundledAsOptional}
jdk.tools
@@ -408,6 +413,7 @@ under the License.
commons-beanutils
commons-beanutils
1.9.4
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-csv/pom.xml b/flink-formats/flink-csv/pom.xml
index 08f238b728168..6fbc6fc146981 100644
--- a/flink-formats/flink-csv/pom.xml
+++ b/flink-formats/flink-csv/pom.xml
@@ -39,6 +39,7 @@ under the License.
org.apache.flink
flink-format-common
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-json/pom.xml b/flink-formats/flink-json/pom.xml
index 686ad5df3c070..35cc4149883b7 100644
--- a/flink-formats/flink-json/pom.xml
+++ b/flink-formats/flink-json/pom.xml
@@ -39,6 +39,7 @@ under the License.
org.apache.flink
flink-format-common
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-sql-avro-confluent-registry/pom.xml b/flink-formats/flink-sql-avro-confluent-registry/pom.xml
index 10789e462f020..d625c8e20a92f 100644
--- a/flink-formats/flink-sql-avro-confluent-registry/pom.xml
+++ b/flink-formats/flink-sql-avro-confluent-registry/pom.xml
@@ -49,6 +49,7 @@ under the License.
org.apache.flink
flink-avro-confluent-registry
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-sql-avro/pom.xml b/flink-formats/flink-sql-avro/pom.xml
index 7fea78b932ed9..3eecebeedbfda 100644
--- a/flink-formats/flink-sql-avro/pom.xml
+++ b/flink-formats/flink-sql-avro/pom.xml
@@ -42,6 +42,7 @@ under the License.
org.apache.flink
flink-avro
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
diff --git a/flink-formats/flink-sql-csv/pom.xml b/flink-formats/flink-sql-csv/pom.xml
index 269499c53cdf4..1a28a3ef931e5 100644
--- a/flink-formats/flink-sql-csv/pom.xml
+++ b/flink-formats/flink-sql-csv/pom.xml
@@ -42,6 +42,7 @@ under the License.
org.apache.flink
flink-csv
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-sql-json/pom.xml b/flink-formats/flink-sql-json/pom.xml
index e32e66f6c554d..63646811591ce 100644
--- a/flink-formats/flink-sql-json/pom.xml
+++ b/flink-formats/flink-sql-json/pom.xml
@@ -42,6 +42,7 @@ under the License.
org.apache.flink
flink-json
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-sql-orc/pom.xml b/flink-formats/flink-sql-orc/pom.xml
index bdc6404872ce8..105d98e14fd2c 100644
--- a/flink-formats/flink-sql-orc/pom.xml
+++ b/flink-formats/flink-sql-orc/pom.xml
@@ -42,6 +42,7 @@ under the License.
org.apache.flink
flink-orc
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-formats/flink-sql-parquet/pom.xml b/flink-formats/flink-sql-parquet/pom.xml
index e1764a4cce6cc..82c7b9938d23c 100644
--- a/flink-formats/flink-sql-parquet/pom.xml
+++ b/flink-formats/flink-sql-parquet/pom.xml
@@ -42,12 +42,14 @@ under the License.
org.apache.flink
flink-parquet
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.parquet
parquet-avro
${flink.format.parquet.version}
+ ${flink.markBundledAsOptional}
org.apache.hadoop
diff --git a/flink-formats/flink-sql-protobuf/pom.xml b/flink-formats/flink-sql-protobuf/pom.xml
index 923cf153437ea..0e3bd96b66831 100644
--- a/flink-formats/flink-sql-protobuf/pom.xml
+++ b/flink-formats/flink-sql-protobuf/pom.xml
@@ -42,6 +42,7 @@ under the License.
org.apache.flink
flink-protobuf
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-kubernetes/pom.xml b/flink-kubernetes/pom.xml
index 8229666c5fb4f..eb79ec0259525 100644
--- a/flink-kubernetes/pom.xml
+++ b/flink-kubernetes/pom.xml
@@ -62,6 +62,7 @@ under the License.
io.fabric8
kubernetes-client
${kubernetes.client.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-metrics/flink-metrics-datadog/pom.xml b/flink-metrics/flink-metrics-datadog/pom.xml
index fd2b40742b9d9..7a95752017b65 100644
--- a/flink-metrics/flink-metrics-datadog/pom.xml
+++ b/flink-metrics/flink-metrics-datadog/pom.xml
@@ -55,6 +55,7 @@ under the License.
com.squareup.okhttp3
okhttp
+ ${flink.markBundledAsOptional}
diff --git a/flink-metrics/flink-metrics-graphite/pom.xml b/flink-metrics/flink-metrics-graphite/pom.xml
index 310d6d3411a7a..2c53624a93dd9 100644
--- a/flink-metrics/flink-metrics-graphite/pom.xml
+++ b/flink-metrics/flink-metrics-graphite/pom.xml
@@ -50,18 +50,21 @@ under the License.
org.apache.flink
flink-metrics-dropwizard
${project.version}
+ ${flink.markBundledAsOptional}
io.dropwizard.metrics
metrics-core
${dropwizard.version}
+ ${flink.markBundledAsOptional}
io.dropwizard.metrics
metrics-graphite
${dropwizard.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-metrics/flink-metrics-influxdb/pom.xml b/flink-metrics/flink-metrics-influxdb/pom.xml
index 3cc5b1ad900cb..efa94fe464437 100644
--- a/flink-metrics/flink-metrics-influxdb/pom.xml
+++ b/flink-metrics/flink-metrics-influxdb/pom.xml
@@ -50,6 +50,7 @@ under the License.
org.influxdb
influxdb-java
2.17
+ ${flink.markBundledAsOptional}
diff --git a/flink-metrics/flink-metrics-prometheus/pom.xml b/flink-metrics/flink-metrics-prometheus/pom.xml
index b5fa2107b5c0d..7821478ddf979 100644
--- a/flink-metrics/flink-metrics-prometheus/pom.xml
+++ b/flink-metrics/flink-metrics-prometheus/pom.xml
@@ -61,18 +61,21 @@ under the License.
io.prometheus
simpleclient
${prometheus.version}
+ ${flink.markBundledAsOptional}
io.prometheus
simpleclient_httpserver
${prometheus.version}
+ ${flink.markBundledAsOptional}
io.prometheus
simpleclient_pushgateway
${prometheus.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-python/pom.xml b/flink-python/pom.xml
index 339510b5b6fc6..30cabe9ba84ba 100644
--- a/flink-python/pom.xml
+++ b/flink-python/pom.xml
@@ -95,6 +95,7 @@ under the License.
org.apache.beam
beam-runners-java-fn-execution
+ ${flink.markBundledAsOptional}
org.apache.beam
@@ -110,6 +111,7 @@ under the License.
org.apache.beam
beam-runners-core-java
+ ${flink.markBundledAsOptional}
@@ -117,6 +119,7 @@ under the License.
com.alibaba
pemja
0.3.0
+ ${flink.markBundledAsOptional}
@@ -124,6 +127,7 @@ under the License.
com.google.protobuf
protobuf-java
+ ${flink.markBundledAsOptional}
@@ -131,11 +135,13 @@ under the License.
net.sf.py4j
py4j
+ ${flink.markBundledAsOptional}
net.razorvine
pyrolite
4.13
+ ${flink.markBundledAsOptional}
net.razorvine
@@ -150,6 +156,7 @@ under the License.
org.apache.arrow
arrow-vector
${arrow.version}
+ ${flink.markBundledAsOptional}
commons-codec
@@ -161,6 +168,7 @@ under the License.
org.apache.arrow
arrow-memory-netty
${arrow.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-rpc/flink-rpc-akka/pom.xml b/flink-rpc/flink-rpc-akka/pom.xml
index 9de36d885041c..40263144bcdeb 100644
--- a/flink-rpc/flink-rpc-akka/pom.xml
+++ b/flink-rpc/flink-rpc-akka/pom.xml
@@ -62,22 +62,26 @@ under the License.
org.scala-lang
scala-library
compile
+ ${flink.markBundledAsOptional}
org.scala-lang
scala-compiler
compile
+ ${flink.markBundledAsOptional}
com.typesafe.akka
akka-actor_${scala.binary.version}
${akka.version}
+ ${flink.markBundledAsOptional}
com.typesafe.akka
akka-remote_${scala.binary.version}
${akka.version}
+ ${flink.markBundledAsOptional}
@@ -95,11 +99,13 @@ under the License.
com.typesafe.akka
akka-slf4j_${scala.binary.version}
${akka.version}
+ ${flink.markBundledAsOptional}
io.netty
netty
3.10.6.Final
+ ${flink.markBundledAsOptional}
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 527011d141969..09174f6f1c953 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -205,6 +205,7 @@ under the License.
io.airlift
aircompressor
0.21
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-sql-client/pom.xml b/flink-table/flink-sql-client/pom.xml
index 2a3ca44e52a82..aa919531ee386 100644
--- a/flink-table/flink-sql-client/pom.xml
+++ b/flink-table/flink-sql-client/pom.xml
@@ -70,12 +70,14 @@ under the License.
org.jline
jline-terminal
3.21.0
+ ${flink.markBundledAsOptional}
org.jline
jline-reader
3.21.0
+ ${flink.markBundledAsOptional}
@@ -187,6 +189,7 @@ under the License.
org.apache.flink
flink-sql-parser
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.calcite
diff --git a/flink-table/flink-sql-gateway/pom.xml b/flink-table/flink-sql-gateway/pom.xml
index 908be32b0390d..f61b4005e4bd3 100644
--- a/flink-table/flink-sql-gateway/pom.xml
+++ b/flink-table/flink-sql-gateway/pom.xml
@@ -47,6 +47,7 @@
org.apache.flink
flink-sql-gateway-api
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
diff --git a/flink-table/flink-sql-jdbc-driver-bundle/pom.xml b/flink-table/flink-sql-jdbc-driver-bundle/pom.xml
index 9d43bdb9be42b..7bdc62b30f05a 100644
--- a/flink-table/flink-sql-jdbc-driver-bundle/pom.xml
+++ b/flink-table/flink-sql-jdbc-driver-bundle/pom.xml
@@ -39,31 +39,37 @@
org.apache.flink
flink-sql-jdbc-driver
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-sql-client
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-sql-gateway-api
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-sql-gateway
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-table-common
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-annotations
${project.version}
+ ${flink.markBundledAsOptional}
@@ -71,6 +77,7 @@
org.apache.flink
flink-core
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-table-api-java-uber/pom.xml b/flink-table/flink-table-api-java-uber/pom.xml
index 1d5eb41f29ed0..70fe59b3581b2 100644
--- a/flink-table/flink-table-api-java-uber/pom.xml
+++ b/flink-table/flink-table-api-java-uber/pom.xml
@@ -40,26 +40,31 @@ under the License.
org.apache.flink
flink-table-common
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-table-api-java
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-table-api-bridge-base
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-table-api-java-bridge
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.flink
flink-sql-gateway-api
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-table-code-splitter/pom.xml b/flink-table/flink-table-code-splitter/pom.xml
index 68905ef8fc1a5..22daa5751ef02 100644
--- a/flink-table/flink-table-code-splitter/pom.xml
+++ b/flink-table/flink-table-code-splitter/pom.xml
@@ -47,6 +47,7 @@ under the License.
org.antlr
antlr4-runtime
${antlr4.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-table-planner-loader-bundle/pom.xml b/flink-table/flink-table-planner-loader-bundle/pom.xml
index 4cee117f4734a..7c0554655c4bf 100644
--- a/flink-table/flink-table-planner-loader-bundle/pom.xml
+++ b/flink-table/flink-table-planner-loader-bundle/pom.xml
@@ -44,6 +44,7 @@
flink-table-planner_${scala.binary.version}
${project.version}
runtime
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-table-planner/pom.xml b/flink-table/flink-table-planner/pom.xml
index 1d61615d30f92..51255452db53b 100644
--- a/flink-table/flink-table-planner/pom.xml
+++ b/flink-table/flink-table-planner/pom.xml
@@ -42,6 +42,7 @@ under the License.
com.google.guava
guava
+ ${flink.markBundledAsOptional}
org.checkerframework
@@ -92,6 +93,7 @@ under the License.
org.apache.flink
flink-sql-parser
${project.version}
+ ${flink.markBundledAsOptional}
org.apache.calcite
@@ -109,6 +111,7 @@ under the License.
org.checkerframework
checker-qual
3.10.0
+ ${flink.markBundledAsOptional}
@@ -124,6 +127,7 @@ under the License.
org.apache.flink
flink-table-calcite-bridge
${project.version}
+ ${flink.markBundledAsOptional}
diff --git a/flink-table/flink-table-runtime/pom.xml b/flink-table/flink-table-runtime/pom.xml
index de60fed50f820..a50823b22c913 100644
--- a/flink-table/flink-table-runtime/pom.xml
+++ b/flink-table/flink-table-runtime/pom.xml
@@ -59,6 +59,7 @@ under the License.
org.apache.flink
flink-table-code-splitter
${project.version}
+ ${flink.markBundledAsOptional}
@@ -72,10 +73,12 @@ under the License.
org.codehaus.janino
janino
+ ${flink.markBundledAsOptional}
org.codehaus.janino
commons-compiler
+ ${flink.markBundledAsOptional}
@@ -84,6 +87,7 @@ under the License.
com.jayway.jsonpath
json-path
${jsonpath.version}
+ ${flink.markBundledAsOptional}
diff --git a/pom.xml b/pom.xml
index 7e77b35570f74..a881b39566972 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,6 +124,7 @@ under the License.
-XX:+UseG1GC -Xms256m
16.1
2.13.4
+ true
1.8
1.7.36
2.17.1
@@ -206,6 +207,7 @@ under the License.
org.apache.flink
flink-shaded-force-shading
+ ${flink.markBundledAsOptional}
@@ -938,6 +940,20 @@ under the License.
+
+ intellij
+
+
+ idea.version
+
+
+
+
+ false
+
+
scala-2.12