<!--
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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
		 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.apache</groupId>
		<artifactId>apache</artifactId>
		<version>20</version>
	</parent>

	<groupId>com.alibaba.ververica</groupId>
	<artifactId>ververica-connectors</artifactId>
	<version>1.17-vvr-8.0.8</version>
	<packaging>pom</packaging>

	<pluginRepositories>
		<pluginRepository>
			<!-- Allows exec-maven-plugin to resolve snapshot plugin dependencies -->
			<id>apache.snapshots.https</id>
			<name>${distMgmtSnapshotsName}</name>
			<url>${distMgmtSnapshotsUrl}</url>
		</pluginRepository>
	</pluginRepositories>

	<modules>
		<module>ververica-connector-common</module>
		<module>ververica-connector-mysql</module> 
		<!-- <module>ververica-connector-postgres</module> -->
		<module>ververica-connector-mongodb</module>
		<!-- <module>ververica-connector-swift</module> -->
		<!-- <module>ververica-connector-polardbo</module> -->
		<module>ververica-connector-datahub</module>
		<!-- <module>ververica-connector-tt</module> -->
		<module>ververica-connector-odps</module>
		<!-- <module>ververica-connector-cloudhbase</module> -->
		<!-- <module>ververica-connector-redis</module> -->
		<!-- <module>ververica-connector-sls</module> -->
		<module>ververica-connector-elasticsearch</module>
		<module>ververica-connector-elasticsearch-sink</module>
		<module>ververica-connector-hologres</module>
		<!-- <module>ververica-connector-jdbc-common</module> -->
		<!-- <module>ververica-connector-jdbc</module> -->
		<!-- <module>ververica-connector-ads</module> -->
		<!-- <module>ververica-connector-adb-3.0</module> -->
		<!-- <module>ververica-connector-rds</module> -->
		<!-- <module>ververica-connector-ots</module> -->
		<module>ververica-connector-metaq</module> 
		<module>ververica-connector-mq</module>
		<!-- <module>ververica-connector-mq5</module> -->
		<module>ververica-connector-kafka</module>
		<!-- <module>ververica-connector-hadoop-shaded</module> -->
		<!-- <module>ververica-connector-cloudhbase-shaded</module> -->
		<!-- <module>ververica-connector-tddl</module> -->
		<module>ververica-connector-continuous-odps</module> 
		<!-- <module>ververica-connector-hive-2.2.0</module> -->
		<!-- <module>ververica-connector-hive-2.3.6</module> -->
		<!-- <module>ververica-connector-hive-3.1.2</module> -->
		<!-- <module>ververica-connector-phoenix-4.14.2-HBase-1.4</module> -->
		<!-- <module>ververica-connector-preview</module> -->
		<!-- <module>ververica-connector-influxdb</module> -->
		<!-- <module>ververica-connector-iceberg</module> -->
		<!-- <module>ververica-connector-lindorm</module> -->
		<!-- <module>ververica-connector-alihbase094</module> -->
		<!-- <module>ververica-connector-adbpg</module> -->
		<!-- <module>ververica-connector-clickhouse</module> -->
		<!-- <module>ververica-connector-vvp</module> -->
		<!-- <module>ververica-connector-faker</module> -->
		<module>ververica-connector-starrocks</module>
		<!-- <module>ververica-connector-oceanbase</module> -->
		<!-- <module>ververica-connector-oceanbase-cdc</module> -->
		<!-- <module>ververica-connector-oceanbase-ocj</module> -->
		<module>ververica-connector-hudi</module>
		<!-- <module>ververica-connector-dlf</module> -->
		<!-- <module>ververica-connector-paimon</module> -->
		<!-- <module>ververica-connector-aws</module> -->
		<!-- <module>ververica-connector-planner</module> -->
		<!-- <module>ververica-connector-tair</module> -->
		<!-- <module>ververica-connector-dist</module> -->
		<!-- <module>tools/ci/java-ci-tools</module> -->
		<!--
		    These connectors are offline because of lacking docs and not production ready.
		    In order to recover this connector:
		    1. Uncomment the <module> below
		    2. Add these connectors to ververica-connector-dist module
		-->
		<!-- <module>ververica-connector-db2</module> -->
		<!-- <module>ververica-connector-sqlserver</module> -->
		<!-- <module>ververica-connector-opengauss</module> -->
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<target.java.version>1.8</target.java.version>
		<maven.compiler.source>${target.java.version}</maven.compiler.source>
		<maven.compiler.target>${target.java.version}</maven.compiler.target>

		<test.unit.pattern>**/*Test.*</test.unit.pattern>
		<flink.XmxITCase>2048m</flink.XmxITCase>
		<flink.XmxUnitTest>1024m</flink.XmxUnitTest>
		<!-- Number of forkCounts for ITCase and UnitTest should take into account allocated memory
             to the jvm (-Xmx) and the available memory on the machine running the test -->
		<flink.forkCountITCase>2</flink.forkCountITCase>
		<flink.forkCountUnitTest>4</flink.forkCountUnitTest>
		<flink.surefire.baseArgLine>-XX:+UseG1GC -Xms256m</flink.surefire.baseArgLine>

		<flink.convergence.phase>validate</flink.convergence.phase>
		<japicmp.outputDir>tools/japicmp-output</japicmp.outputDir>

		<!-- Child projects should define these properties -->
		<japicmp.referenceVersion>1.17-vvr-8.0.8</japicmp.referenceVersion>
		<flink.version>1.17-vvr-8.0.8-SNAPSHOT</flink.version>
		<flink.parent.artifactId/>
		<scala.binary.version>2.12</scala.binary.version>

		<!-- CDC version update part start -->
		<flink.cdc.connectors.version>2.4-vvr-8.0.8-1-SNAPSHOT</flink.cdc.connectors.version>
		<debezium.version>1.9.7.Final</debezium.version>
		<!-- CDC version update part end -->

		<aliyun-dlf.version>0.2.14-SNAPSHOT</aliyun-dlf.version>
		<!-- used by hive connector -->
		<hive.aliyun-dlf.version>0.2.23</hive.aliyun-dlf.version>
		<flink-shaded-hadoop.verison>3.1.3-10.0-SNAPSHOT</flink-shaded-hadoop.verison>
		<iceberg.version>1.5.0-2-SNAPSHOT</iceberg.version>
		<hudi.version>0.14.0-SNAPSHOT</hudi.version>
		<testcontainers.version>1.17.2</testcontainers.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>

		<diamond.version>3.8.11</diamond.version>
		<log4j.version>2.13.3</log4j.version>
		<assertj.version>3.21.0</assertj.version>
		<mockito.version>2.28.2</mockito.version>
		<arch_classifier></arch_classifier>
		<scala.binary.version>2.12</scala.binary.version>
		<flink.shaded.version>16.1</flink.shaded.version>
		<flink.shaded.jackson.version>2.13.4</flink.shaded.jackson.version>
		<junit5.version>5.9.1</junit5.version>
		<assertj.version>3.23.1</assertj.version>
		<powermock.version>2.0.9</powermock.version>
		<hamcrest.version>1.3</hamcrest.version>
		<slf4j.version>1.7.36</slf4j.version>
		<shade.compatibility.phase>package</shade.compatibility.phase>
	</properties>

	<distributionManagement>
		<repository>
			<id>releases</id>
			<url>http://mvnrepo.alibaba-inc.com/mvn/releases</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<url>http://mvnrepo.alibaba-inc.com/mvn/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.esotericsoftware.kryo</groupId>
				<artifactId>kryo</artifactId>
				<version>2.24.0</version>
			</dependency>
			<dependency>
				<groupId>org.objenesis</groupId>
				<artifactId>objenesis</artifactId>
				<version>2.1</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${junit5.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.testcontainers</groupId>
				<artifactId>testcontainers-bom</artifactId>
				<version>${testcontainers.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j-impl</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-api</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${log4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<dependency>
				<groupId>org.xerial.snappy</groupId>
				<artifactId>snappy-java</artifactId>
				<version>1.1.10.1</version>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<dependencies>
		<!-- Apache Flink dependencies -->
		<!-- These dependencies are provided, because they should not be packaged into the JAR file. -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table-common</artifactId>
			<version>${flink.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table-api-java-bridge</artifactId>
			<version>${flink.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table-runtime</artifactId>
			<version>${flink.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
			<version>${flink.version}</version>
			<scope>provided</scope>
		</dependency>
		<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-clients</artifactId>
			<version>${flink.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.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>net.bytebuddy</groupId>
			<artifactId>byte-buddy</artifactId>
			<version>1.9.10</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</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.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>${powermock.version}</version>
			<type>jar</type>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito2</artifactId>
			<version>${powermock.version}</version>
			<type>jar</type>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.mockito</groupId>
					<artifactId>mockito-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>${hamcrest.version}</version>
			<type>jar</type>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<!-- These plugins are enabled by default -->
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.diffplug.spotless</groupId>
				<artifactId>spotless-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!-- QA plugins -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>3.1.2</version>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<!-- Note: match version with docs/flinkDev/ide_setup.md -->
							<version>8.14</version>
						</dependency>
					</dependencies>
					<executions>
						<execution>
							<id>validate</id>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
						<configLocation>/tools/maven/checkstyle.xml</configLocation>
						<logViolationsToConsole>true</logViolationsToConsole>
						<failOnViolation>true</failOnViolation>
						<!-- Limit checkstyle to the actual source directories (by default includes generated sources in target/ -->
						<sourceDirectories>
							<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
							<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
						</sourceDirectories>
					</configuration>
				</plugin>

				<plugin>
					<groupId>com.diffplug.spotless</groupId>
					<artifactId>spotless-maven-plugin</artifactId>
					<version>2.27.1</version>
					<configuration>
						<java>
							<googleJavaFormat>
								<version>1.7</version>
								<style>AOSP</style>
							</googleJavaFormat>

							<!-- \# refers to the static imports -->
							<importOrder>
								<order>org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\#</order>
							</importOrder>

							<removeUnusedImports/>
						</java>
					</configuration>
					<executions>
						<execution>
							<id>spotless-check</id>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.0.0-M1</version>
					<executions>
						<execution>
							<id>enforce-maven</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<!-- enforce at least mvn version 3.1.1 (see FLINK-12447) -->
										<version>[3.1.1,)</version>
									</requireMavenVersion>
									<requireJavaVersion>
										<version>${target.java.version}</version>
									</requireJavaVersion>
								</rules>
							</configuration>
						</execution>
						<execution>
							<id>forbid-direct-table-planner-dependencies</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<bannedDependencies>
										<excludes>
											<exclude>org.apache.flink:flink-table-planner_*</exclude>
										</excludes>
										<includes>
											<include>org.apache.flink:flink-table-planner_*:*:*:test</include>
										</includes>
										<message>
											Direct dependencies on flink-table-planner are not allowed.
											You should depend on either Table API modules or flink-table-planner-loader.
										</message>
									</bannedDependencies>
								</rules>
							</configuration>
						</execution>
						<execution>
							<id>dependency-convergence</id>
							<!-- disabled by default as it interacts badly with shade-plugin -->
							<phase>none</phase>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<dependencyConvergence/>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.rat</groupId>
					<artifactId>apache-rat-plugin</artifactId>
					<version>0.13</version>
					<inherited>false</inherited>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<consoleOutput>true</consoleOutput>
						<excludeSubProjects>false</excludeSubProjects>
						<numUnapprovedLicenses>0</numUnapprovedLicenses>
						<licenses>
							<!-- Enforce this license:
                                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.
                            -->
							<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
								<licenseFamilyCategory>AL2</licenseFamilyCategory>
								<licenseFamilyName>Apache License 2.0</licenseFamilyName>
								<notes/>
								<patterns>
									<pattern>Licensed to the Apache Software Foundation (ASF) under one</pattern>
								</patterns>
							</license>
						</licenses>
						<licenseFamilies>
							<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
								<familyName>Apache License 2.0</familyName>
							</licenseFamily>
						</licenseFamilies>
						<excludes>
							<!-- Additional files like .gitignore etc.-->
							<exclude>**/.*/**</exclude>
							<exclude>**/*.prefs</exclude>
							<exclude>**/*.log</exclude>

							<!-- ArchUnit violation stores  -->
							<exclude>**/archunit-violations/**</exclude>

							<!-- Administrative files in the main trunk. -->
							<exclude>**/README.md</exclude>
							<exclude>.github/**</exclude>
							<!-- Build files -->
							<exclude>**/*.iml</exclude>
							<!-- Generated content -->
							<exclude>tools/japicmp-output/**</exclude>
							<exclude>**/target/**</exclude>
						</excludes>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>3.1.0</version>
					<executions>
						<execution>
							<id>check-license</id>
							<!-- manually called -->
							<phase>none</phase>
							<goals>
								<goal>java</goal>
							</goals>
							<configuration>
								<mainClass>org.apache.flink.tools.ci.licensecheck.LicenseChecker</mainClass>
								<includePluginDependencies>true</includePluginDependencies>
								<includeProjectDependencies>false</includeProjectDependencies>
							</configuration>
						</execution>
					</executions>
					<!-- Child projects should add the following:
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.flink</groupId>
                            <artifactId>flink-ci-tools</artifactId>
                            <version>${flink.version}</version>
                        </dependency>
                    </dependencies>
                    -->
				</plugin>

				<plugin>
					<!-- Configuration for the binary compatibility checker -->
					<groupId>io.github.zentol.japicmp</groupId>
					<artifactId>japicmp-maven-plugin</artifactId>
					<version>0.16.0_m325</version>
					<configuration>
						<oldVersion>
							<dependency>
								<groupId>org.apache.flink</groupId>
								<artifactId>${project.artifactId}</artifactId>
								<version>${japicmp.referenceVersion}</version>
								<type>${project.packaging}</type>
							</dependency>
						</oldVersion>
						<newVersion>
							<file>
								<path>
									${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}
								</path>
							</file>
						</newVersion>
						<parameter>
							<onlyModified>true</onlyModified>
							<includes>
								<include>@org.apache.flink.annotation.Public</include>
								<!-- The following line is un-commented by tools/releasing/update_japicmp_configuration.sh
                                     as part of the release process -->
								<!--<include>@org.apache.flink.annotation.PublicEvolving</include>-->
							</includes>
							<excludes>
								<exclude>@org.apache.flink.annotation.Experimental</exclude>
								<exclude>@org.apache.flink.annotation.PublicEvolving</exclude>
								<exclude>@org.apache.flink.annotation.Internal</exclude>
							</excludes>
							<accessModifier>public</accessModifier>
							<breakBuildOnModifications>false</breakBuildOnModifications>
							<breakBuildOnBinaryIncompatibleModifications>true
							</breakBuildOnBinaryIncompatibleModifications>
							<breakBuildOnSourceIncompatibleModifications>true
							</breakBuildOnSourceIncompatibleModifications>
							<onlyBinaryIncompatible>false</onlyBinaryIncompatible>
							<includeSynthetic>true</includeSynthetic>
							<ignoreMissingClasses>false</ignoreMissingClasses>
							<skipPomModules>true</skipPomModules>
							<!-- Don't break build on newly added maven modules -->
							<ignoreNonResolvableArtifacts>true</ignoreNonResolvableArtifacts>
						</parameter>
						<projectBuildDir>${rootDir}/${japicmp.outputDir}/${project.artifactId}</projectBuildDir>
						<dependencies>
							<dependency>
								<groupId>org.apache.flink</groupId>
								<artifactId>flink-annotations</artifactId>
								<version>${flink.version}</version>
							</dependency>
						</dependencies>
					</configuration>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>cmp</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- Build plugins -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
					<configuration>
						<source>${target.java.version}</source>
						<target>${target.java.version}</target>
						<!-- The semantics of this option are reversed, see MCOMPILER-209. -->
						<useIncrementalCompilation>false</useIncrementalCompilation>
						<compilerArgs>
							<!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 -->
							<arg>-Xpkginfo:always</arg>
						</compilerArgs>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
					<configuration>
						<archive>
							<!-- Globally exclude maven metadata, because it may accidentally bundle files we don't intend to -->
							<addMavenDescriptor>false</addMavenDescriptor>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.2.4</version>
					<configuration>
						<!-- This section contains the core configuration that is applied to every jar that we create.-->
						<filters combine.children="append">
							<filter>
								<artifact>*</artifact>
								<excludes>
									<!-- Globally exclude log4j.properties from our JAR files. -->
									<exclude>log4j.properties</exclude>
									<exclude>log4j2.properties</exclude>
									<exclude>log4j-test.properties</exclude>
									<exclude>log4j2-test.properties</exclude>
									<!-- Do not copy the signatures in the META-INF folder.
                                    Otherwise, this might cause SecurityExceptions when using the JAR. -->
									<exclude>META-INF/*.SF</exclude>
									<exclude>META-INF/*.DSA</exclude>
									<exclude>META-INF/*.RSA</exclude>
									<!-- META-INF/maven can contain 2 things:
                                        - For archetypes, it contains an archetype-metadata.xml.
                                        - For other jars, it contains the pom for all dependencies under the respective <groupId>/<artifactId>/ directory.

                                         We want to exclude the poms because they may be under an incompatible license,
                                         however the archetype metadata is required and we need to keep that around.

                                         This pattern excludes directories under META-INF/maven.
                                         ('?*/**' does not work because '**' also matches zero directories;
                                         everything that matches '?*' also matches '?*/**')

                                        The initial '**' allows the pattern to also work for multi-release jars that may contain such entries under
                                        'META-INF/versions/11/META-INF/maven/'.
                                         -->
									<exclude>**/META-INF/maven/?*/?*/**</exclude>
								</excludes>
							</filter>
						</filters>
						<transformers combine.children="append">
							<!-- The service transformer is needed to merge META-INF/services files -->
							<transformer
									implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
							<!-- The ApacheNoticeResourceTransformer collects and aggregates NOTICE files -->
							<transformer
									implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
								<projectName>Apache Flink</projectName>
								<encoding>UTF-8</encoding>
							</transformer>
						</transformers>
					</configuration>
					<executions>
						<execution>
							<id>shade-flink</id>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
							<configuration>
								<shadeTestJar>false</shadeTestJar>
								<shadedArtifactAttached>true</shadedArtifactAttached>
								<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
								<createDependencyReducedPom>true</createDependencyReducedPom>
								<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml
								</dependencyReducedPomLocation>
								<!-- Filters MUST be appended; merging filters does not work properly, see MSHADE-305 -->
								<filters combine.children="append">
									<!-- io.netty:netty brings its own LICENSE.txt which we don't need -->
									<filter>
										<artifact>io.netty:netty</artifact>
										<excludes>
											<exclude>META-INF/LICENSE.txt</exclude>
										</excludes>
									</filter>
								</filters>
								<artifactSet combine.self="override">
									<excludes>
										<!-- log4j -->
										<exclude>org.slf4j:slf4j-log4j12</exclude>
										<exclude>log4j:log4j</exclude>
										<!-- jars imported by parent -->
										<exclude>org.slf4j:slf4j-api</exclude>
										<exclude>com.google.code.findbugs:jsr305</exclude>
										<!-- flink shaded jars -->
										<exclude>org.apache.flink:flink-shaded-*</exclude>
										<!-- ververica-connector-planner-delegate dependencies are provided in jar way -->
										<exclude>com.alibaba.ververica:ververica-connector-planner-delegate</exclude>
									</excludes>
								</artifactSet>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
					<configuration>
						<quiet>true</quiet>
						<detectOfflineLinks>false</detectOfflineLinks>
						<additionalJOptions combine.children="append">
							<additionalJOption>-Xdoclint:none</additionalJOption>
						</additionalJOptions>
					</configuration>
				</plugin>


				<!--surefire for unit tests and integration tests-->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M5</version>
					<configuration>
						<!-- enables TCP/IP communication between surefire and forked JVM-->
						<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
						<trimStackTrace>false</trimStackTrace>
						<systemPropertyVariables>
							<forkNumber>0${surefire.forkNumber}</forkNumber>
							<!-- $$ ensures that surefire resolves this to the current forkNumber,
                                 instead of maven during initialization -->
							<mvn.forkNumber>${surefire.forkNumber}</mvn.forkNumber>
							<user.country>US</user.country>
							<user.language>en</user.language>
							<project.basedir>${project.basedir}</project.basedir>
							<junit.jupiter.extensions.autodetection.enabled>true</junit.jupiter.extensions.autodetection.enabled>
						</systemPropertyVariables>
						<argLine>-Xms256m -Xmx2048m -XX:+UseG1GC</argLine>
					</configuration>
					<executions>
						<execution>
							<!--execute all the unit tests-->
							<id>default-test</id>
							<phase>test</phase>
							<goals>
								<goal>test</goal>
							</goals>
							<configuration>
								<includes>
									<include>${test.unit.pattern}</include>
								</includes>
								<forkCount>${flink.forkCountUnitTest}</forkCount>
								<argLine>${flink.surefire.baseArgLine} -Xmx${flink.XmxUnitTest}</argLine>
							</configuration>
						</execution>
						<execution>
							<!--execute all the integration tests-->
							<id>integration-tests</id>
							<phase>integration-test</phase>
							<goals>
								<goal>test</goal>
							</goals>
							<configuration>
								<includes>
									<include>**/*.*</include>
								</includes>
								<excludes>
									<exclude>${test.unit.pattern}</exclude>
								</excludes>
								<forkCount>${flink.forkCountITCase}</forkCount>
								<argLine>${flink.surefire.baseArgLine} -Xmx${flink.XmxITCase}</argLine>
								<reuseForks>false</reuseForks>
							</configuration>
						</execution>
					</executions>
				</plugin>


				<!-- Misc plugins -->
				<plugin>
					<!-- Inherited from Apache parent, but not actually used. Disable to reduce noise. -->
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-descriptor</id>
							<phase>none</phase>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<!-- Sets a 'rootDir' system property that points to the root of the project.
                         Child projects who want to use it must set the ${flink.parent.artifactId} property -->
					<groupId>org.commonjava.maven.plugins</groupId>
					<artifactId>directory-maven-plugin</artifactId>
					<version>0.1</version>
					<executions>
						<execution>
							<id>directories</id>
							<goals>
								<goal>directory-of</goal>
							</goals>
							<phase>initialize</phase>
							<configuration>
								<property>rootDir</property>
								<project>
									<groupId>com.alibaba.ververica</groupId>
									<artifactId>${flink.parent.artifactId}</artifactId>
								</project>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- Use version 1.6.0 to avoid NPE on hadoop-shaded -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-remote-resources-plugin</artifactId>
					<version>1.6.0</version>
				</plugin>
				<!-- Use version 2.8 to use deployAtEnd feature -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8</version>
				</plugin>
				<plugin>
					<groupId>com.alibaba.ververica</groupId>
					<artifactId>jar-crypto-maven-plugin</artifactId>
					<version>1.0-SNAPSHOT</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<!-- used for SNAPSHOT and regular releases -->
			<id>docs-and-source</id>
			<activation>
				<property>
					<name>docs-and-source</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<quiet>true</quiet>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
				</property>
			</activation>
			<properties>
				<target.java.version>1.8</target.java.version>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<executions>
							<execution>
								<id>enforce-maven</id>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<requireMavenVersion>
											<!-- maven version must be at least 3.2.5 -->
											<version>[3.2.5,)</version>
										</requireMavenVersion>
										<requireJavaVersion>
											<version>1.8.0</version>
										</requireJavaVersion>
									</rules>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-release-plugin</artifactId>
							<version>2.1</version>
							<configuration>
								<mavenExecutorId>forked-path</mavenExecutorId>
								<useReleaseProfile>false</useReleaseProfile>
								<arguments>${arguments} -Psonatype-oss-release</arguments>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>

		<profile>
			<id>check-convergence</id>
			<activation>
				<property>
					<name>check-convergence</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<executions>
							<execution>
								<id>dependency-convergence</id>
								<phase>${flink.convergence.phase}</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>fast</id>
			<activation>
				<property>
					<name>fast</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.rat</groupId>
							<artifactId>apache-rat-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-checkstyle-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
						<plugin>
							<groupId>com.diffplug.spotless</groupId>
							<artifactId>spotless-maven-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-enforcer-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
						<plugin>
							<groupId>io.github.zentol.japicmp</groupId>
							<artifactId>japicmp-maven-plugin</artifactId>
							<configuration>
								<skip>true</skip>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>

		<profile>
			<id>java11</id>
			<activation>
				<jdk>[11,)</jdk>
			</activation>

			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-shade-plugin</artifactId>
							<version>3.2.4</version>
						</plugin>
						<plugin>
							<groupId>io.github.zentol.japicmp</groupId>
							<artifactId>japicmp-maven-plugin</artifactId>
							<dependencies>
								<dependency>
									<groupId>javax.xml.bind</groupId>
									<artifactId>jaxb-api</artifactId>
									<version>2.3.0</version>
								</dependency>
								<dependency>
									<groupId>com.sun.xml.bind</groupId>
									<artifactId>jaxb-impl</artifactId>
									<version>2.3.1</version>
								</dependency>
								<dependency>
									<groupId>com.sun.xml.bind</groupId>
									<artifactId>jaxb-core</artifactId>
									<version>2.3.0</version>
								</dependency>
								<dependency>
									<groupId>javax.activation</groupId>
									<artifactId>activation</artifactId>
									<version>1.1.1</version>
								</dependency>
							</dependencies>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<configuration>
								<additionalJOptions>
									<additionalJOption>--add-exports=java.base/sun.net.util=ALL-UNNAMED</additionalJOption>
								</additionalJOptions>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<profile>
			<id>java17</id>
			<activation>
				<jdk>[17,)</jdk>
			</activation>

			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>com.diffplug.spotless</groupId>
							<artifactId>spotless-maven-plugin</artifactId>
							<configuration>
								<!-- Current google format does not run on Java 17.
                                     Don't upgrade it in this profile because it formats code differently.
                                     Re-evaluate once support for Java 8 is dropped. -->
								<skip>true</skip>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>

		<profile>
			<id>java11-target</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>11</source>
							<target>11</target>
							<compilerArgs combine.children="append">
								<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
								<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
								<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
								<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
							</compilerArgs>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>java17-target</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>17</source>
							<target>17</target>
							<compilerArgs combine.children="append">
								<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
								<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
								<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
								<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
							</compilerArgs>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>maven-central-release</id>
			<properties>
				<shade.compatibility.phase>none</shade.compatibility.phase>
			</properties>
			<distributionManagement>
				<repository>
					<id>oss</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
				<snapshotRepository>
					<id>oss</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>3.0.0</version>
						<inherited>false</inherited>
						<executions>
							<execution>
								<id>create-release-placeholders</id>
								<phase>initialize</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>
									<executable>tools/create-release-placeholders.sh</executable>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<executions>
							<execution>
								<id>shade-flink</id>
								<configuration>
									<shadedArtifactAttached>false</shadedArtifactAttached>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<configuration>
							<includes>
								<include>**/placeholder.txt</include>
							</includes>
						</configuration>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0-ververica-SNAPSHOT</version>
						<configuration>
							<signAtEnd>true</signAtEnd>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-install-plugin</artifactId>
						<configuration>
							<installAtEnd>true</installAtEnd>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<deployAtEnd>true</deployAtEnd>
						</configuration>
					</plugin>
					<plugin>
						<groupId>com.alibaba.ververica</groupId>
						<artifactId>jar-crypto-maven-plugin</artifactId>
						<configuration>
							<jarSelector>
								${project.artifactId}-${project.version}.jar
							</jarSelector>
						</configuration>
						<executions>
							<execution>
								<id>encrypt-jar</id>
								<phase>package</phase>
								<goals>
									<goal>encrypt</goal>
								</goals>
								<configuration>
									<encryptAtEnd>true</encryptAtEnd>
									<encryptedJarClassifier>uber</encryptedJarClassifier>
									<attach>true</attach>
									<overwrite>false</overwrite>
								</configuration>
							</execution>
							<execution>
								<id>extract-jar</id>
								<phase>package</phase>
								<goals>
									<goal>extract</goal>
								</goals>
								<configuration>
									<extractAtEnd>true</extractAtEnd>
									<encryptedJarClassifier>encrypted</encryptedJarClassifier>
									<discardEncryptedJar>true</discardEncryptedJar>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>encryption</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.alibaba.ververica</groupId>
						<artifactId>jar-crypto-maven-plugin</artifactId>
						<configuration>
							<jarSelector>
								${project.artifactId}-${project.version}-jar-with-dependencies.jar
							</jarSelector>
						</configuration>
						<executions>
							<execution>
								<id>encrypt-jar</id>
								<phase>package</phase>
								<goals>
									<goal>encrypt</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
