<?xml version="1.0" encoding="UTF-8"?>
<!--~
  ~ Copyright 2015 Confluent Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~-->


<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.confluent</groupId>
    <artifactId>common-parent</artifactId>
    <packaging>pom</packaging>
    <version>7.3.3</version>
    <name>common</name>
    <organization>
        <name>Confluent, Inc.</name>
        <url>https://confluent.io</url>
    </organization>
    <url>https://confluent.io</url>
    <description>
        Common utilities, including metrics and config.
    </description>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <!--jacoco prepare-agent needs argLine defined to set this variable. if we don't have a default set then maven gets angry.-->
        <argLine></argLine>
        <avro.version>1.11.0</avro.version>
        <required.maven.version>3.2</required.maven.version>
        <kafka.version>7.3.3-ccs</kafka.version>
        <ce.kafka.version>7.3.3-ce</ce.kafka.version>
        <easymock.version>4.3</easymock.version>
        <!-- keep exec-maven-plugin on 1.5.0 until https://github.com/mojohaus/exec-maven-plugin/issues/76 is fixed
             running our LicenseFinder plugin in create-licenses-for-docker breaks when upgrading to 1.6.0 -->
        <exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
        <spotbugs.version>4.7.1</spotbugs.version>
        <spotbugs.maven.plugin.version>4.7.1.0</spotbugs.maven.plugin.version>
        <java.version>8</java.version>
        <jackson.version>2.13.4</jackson.version>
        <jackson.databind.version>2.13.4.2</jackson.databind.version>
        <jackson.bom.version>2.13.4.20221013</jackson.bom.version>
        <jackson.cbor.version>2.13.4</jackson.cbor.version>

        <gson.version>2.9.0</gson.version>
        <guava.version>30.1.1-jre</guava.version>
        <jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
        <junit.version>4.13.2</junit.version>
        <junit.jupiter.version>5.8.2</junit.jupiter.version>
        <kafka.scala.version>2.13</kafka.scala.version>
        <scala.version>2.13.10</scala.version>
        <maven-assembly.version>3.3.0</maven-assembly.version>
        <maven-compiler-plugin.version>3.10.0</maven-compiler-plugin.version>
        <maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
        <maven-deploy.version>2.8.2</maven-deploy.version>
        <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
        <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
        <maven-site-plugin.version>3.9.0</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
        <mbknor-jackson-jsonschema.version>1.0.39</mbknor-jackson-jsonschema.version>
        <buildnumber-plugin.version>1.4</buildnumber-plugin.version>
        <mockito.version>4.6.1</mockito.version>
        <mockito-all.version>1.10.19</mockito-all.version>
        <os-maven-plugin.version>1.7.0</os-maven-plugin.version>
        <jaxb.version>2.3.0</jaxb.version>
        <netty.version>4.1.86.Final</netty.version>
        <hamcrest.version>1.3</hamcrest.version>
        <protobuf.version>3.19.6</protobuf.version>
        <powermock.version>2.0.9</powermock.version>
        <!-- Potentially used by downstream projects -->
        <slf4j-api.version>${slf4j.version}</slf4j-api.version>
        <slf4j.version>1.7.36</slf4j.version>
        <slf4j-reload4j.version>1.7.36</slf4j-reload4j.version>
        <snakeyaml.version>1.33</snakeyaml.version>
        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-reload4j/1.7.36 -->
        <reload4j.version>1.2.19</reload4j.version>
        <logredactor.version>1.0.11</logredactor.version>
        <zkclient.version>0.11</zkclient.version>
        <zookeeper.version>3.6.3</zookeeper.version>
        <bouncycastle.version>1.68</bouncycastle.version>
        <jmx_prometheus_javaagent.version>0.17.2</jmx_prometheus_javaagent.version>
        <jolokia-jvm.version>1.7.1</jolokia-jvm.version>
        <checkstyle.version>9.3</checkstyle.version>
        <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
        <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
        <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <checkstyle.config.location>checkstyle/checkstyle.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>checkstyle/common-suppressions.xml</checkstyle.suppressions.location>
        <dependency.check.version>7.4.4</dependency.check.version>
        <dependency.check.suppressions.location>dependency-check/suppressions.xml</dependency.check.suppressions.location>
        <dependency.check.skip>false</dependency.check.skip>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- docker build support -->
        <GIT_COMMIT>unknown</GIT_COMMIT>
        <BUILD_NUMBER>-1</BUILD_NUMBER>
        <docker.skip-build>true</docker.skip-build>
        <docker.skip-test>true</docker.skip-test>
        <docker.registry>placeholder/</docker.registry>  <!-- Registry for this build. Must specify a value, or exec plugin throws NPE :((( -->
        <docker.tag>${project.version}</docker.tag>  <!-- Tag for this build -->
        <docker.upstream-registry>${docker.registry}</docker.upstream-registry>  <!-- Registry for base images -->
        <docker.upstream-tag>${docker.tag}</docker.upstream-tag>  <!-- Tag for base images -->
        <docker.test-registry>${docker.upstream-registry}</docker.test-registry>  <!-- Registry for integration test dependencies -->
        <docker.test-tag>${docker.upstream-tag}</docker.test-tag>  <!-- Tag for integration test dependencies -->
        <dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
        <!-- The name of the docker file to run. -->
        <docker.file>Dockerfile</docker.file>
        <!-- Pull the latest base image or use a local image. -->
        <docker.pull-image>false</docker.pull-image>
        <dependency.check.skip>true</dependency.check.skip>
        <io.confluent.common.version>7.3.3</io.confluent.common.version>
        <!-- This is a version of the pom file that we install and deploy because
            the kafka and ce-kafka version ranges are resolved.
        -->
        <installed.pom.file>installed_pom.xml</installed.pom.file>
        <coderplus.plugin.version>1.0</coderplus.plugin.version>
        <!-- This version range is only used in the custom resolver plugin for 
            resolving the version of ccs and ce kafka. This property should 
            never be used any where else.
        -->
        <confluent.version.range>7.3.3</confluent.version.range>
        <!-- This is the version range used by resolver-maven-plugin to resolve the
            version of ccs and ce-kafka. This allowed this property to be overridden
            through cmd lines.
        -->
        <versionRange>${confluent.version.range}</versionRange>
        <!-- Controls whether we run the maven resolver plugin which is used to resolve
            the version ranges for kafka and ce-kafka. We want to run this for local builds,
            but disable this in the jenkins profile so it doesn't run during CI builds.
        -->
        <skip.maven.resolver.plugin>false</skip.maven.resolver.plugin>
        <!-- The custom install step handles installing a modified pom file with the
            kafka version ranges resolved. We only do this for local builds so for 
            CI builds we set the phase to none.
        -->
        <custom.install.phase>install</custom.install.phase>
        <!-- The custom deploy step handles copying the modified pom over the 
            standard pom so that we deploy a pom with the kafka versions resolved.
            We only do this for local builds so for 
            CI builds we set the phase to none.
        -->
        <custom.deploy.phase>deploy</custom.deploy.phase>
        <maven.resolver.plugin.version>0.6.0</maven.resolver.plugin.version>
        <fail.if.ce-kafka.version.not.found>false</fail.if.ce-kafka.version.not.found>
        <io.confluent.license-file-generator.version>${confluent.version.range}</io.confluent.license-file-generator.version>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/confluentinc/common.git</connection>
        <developerConnection>scm:git:git@github.com:confluentinc/common.git</developerConnection>
        <url>https://github.com/confluentinc/common</url>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>assembly-plugin-boilerplate</module>
        <module>build-tools</module>
        <module>metrics</module>
        <module>config</module>
        <module>utils</module>
        <module>logging</module>
        <module>log4j-extensions</module>
        <module>log4j2-extensions</module>
        <module>package</module>
        <module>parent</module>
        <module>disk-usage-agent</module>
    </modules>

    <repositories>
        <repository>
            <id>confluent</id>
            <url>https://packages.confluent.io/maven/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>confluent</id>
            <url>https://packages.confluent.io/maven/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <!-- our deps-->
            <!-- This is to unify the version of Protocol Buffers across CP -->
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf.version}</version>
            </dependency>
            <!-- snakeyaml is brought in by several confluent libraries
                 as "provided" dependency, thus leading to usage of
                 outdated versions. This instructs projects using this pom
                 to use this snakeyaml version, unless otherwise overriden.
                 After this change, we should remove all the snakeyaml re-definitions
                 in other Confluent repositories. -->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper</artifactId>
                <version>${zookeeper.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty-handler</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty-transport-native-epoll</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.101tec</groupId>
                <artifactId>zkclient</artifactId>
                <version>${zkclient.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>slf4j-log4j12</artifactId>
                        <groupId>org.slf4j</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>log4j</artifactId>
                        <groupId>log4j</groupId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.zookeeper</groupId>
                        <artifactId>zookeeper</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-annotations</artifactId>
                <version>${spotbugs.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <!-- Jackson artifacts with individual versioning -->
            <dependency>
              <groupId>com.fasterxml.jackson</groupId>
              <artifactId>jackson-bom</artifactId>
              <version>${jackson.bom.version}</version>
              <scope>import</scope>
              <type>pom</type>
            </dependency>
            <!-- We fix the scala version to prevent downstream projects from bringing in
            different minor versions of Scala via different dependencies -->
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-reflect</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-cbor</artifactId>
                <version>${jackson.cbor.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.databind.version}</version>
            </dependency>
            <!-- Kafka Deps -->
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka_${kafka.scala.version}</artifactId>
                <version>${kafka.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-streams</artifactId>
                <version>${kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${kafka.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-api</artifactId>
                <version>${kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-runtime</artifactId>
                <version>${kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-json</artifactId>
                <version>${kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-file</artifactId>
                <version>${kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-reload4j</artifactId>
                <version>${slf4j-reload4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.reload4j</groupId>
                <artifactId>reload4j</artifactId>
                <version>${reload4j.version}</version>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>logredactor</artifactId>
                <version>${logredactor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport-native-epoll</artifactId>
                <version>${netty.version}</version>
            </dependency>

            <!--this is our own artifacts, but lets others inherit-->
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>common-config</artifactId>
                <version>${io.confluent.common.version}</version>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>common-metrics</artifactId>
                <version>${io.confluent.common.version}</version>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>common-utils</artifactId>
                <version>${io.confluent.common.version}</version>
            </dependency>

            <!--test deps-->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.jupiter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>${easymock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-core</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-easymock</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito2</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-bom</artifactId>
                <version>${mockito.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito-all.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <!-- Kafka's SSL utilities are used in tests. -->
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka_${kafka.scala.version}</artifactId>
                <version>${kafka.version}</version>
                <classifier>test</classifier>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${kafka.version}</version>
                <classifier>test</classifier>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>assembly-plugin-boilerplate</artifactId>
            <version>${io.confluent.common.version}</version>
            <classifier>resources</classifier>
            <type>zip</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>${os-maven-plugin.version}</version>
            </extension>
            <extension>
                <groupId>org.springframework.build</groupId>
                <artifactId>aws-maven</artifactId>
                <version>5.0.0.RELEASE</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                    <configuration>
                        <configLocation>${checkstyle.config.location}</configLocation>
                        <suppressionsLocation>${checkstyle.suppressions.location}</suppressionsLocation>
                        <sourceDirectories>
                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        </sourceDirectories>
                        <encoding>UTF-8</encoding>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <failOnViolation>true</failOnViolation>
                        <includeResources>false</includeResources>
                        <includeTestResources>false</includeTestResources>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>io.confluent</groupId>
                            <artifactId>build-tools</artifactId>
                            <version>${io.confluent.common.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Commit-ID>${gitCommitID}</Commit-ID>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                    <configuration>
                        <!--
                        Disable dependency locations for latest maven-plugin-info-reports to eliminate blacklisting
                        warnings: "The repository url '...' is invalid - Repository '...' will be blacklisted."
                        -->
                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs.maven.plugin.version}</version>
                    <dependencies>
                      <dependency>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs</artifactId>
                        <version>${spotbugs.version}</version>
                      </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>dockerfile-maven-plugin</artifactId>
                    <version>${dockerfile-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${buildnumber-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                        <buildNumberPropertyName>gitCommitID</buildNumberPropertyName>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>@{argLine} -Djava.awt.headless=true</argLine>
                    <excludedGroups>io.confluent.common.utils.IntegrationTest, IntegrationTest</excludedGroups>
                </configuration>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <argLine>@{argLine} -Djava.awt.headless=true</argLine>
                    <groups>io.confluent.common.utils.IntegrationTest, IntegrationTest</groups>
                    <!-- by default failsafe only includes class names that start or end in IT,
                         we use regular test class names with @Category and the group above. For
                         Junit5 we add an "IntegrationTest" tag -->
                    <includes>
                        <!-- defaults copied from maven-surefire-plugin -->
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                        <include>**/*TestCase.java</include>
                        <!-- maven-failsafe-plugin defaults -->
                        <include>**/IT*.java</include>
                        <include>**/*IT.java</include>
                        <include>**/*ITCase.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals><goal>enforce</goal></goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${required.maven.version}</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- This custom resolver plugin is used to resolve the version ranges
                for kafka and ce-kafka since they don't use the standard version scheme.
                This will set the properties kafka.version and ce.kafka.version
            -->
            <plugin>
                <groupId>io.confluent</groupId>
                <artifactId>resolver-maven-plugin</artifactId>
                <version>${maven.resolver.plugin.version}</version>
                <inherited>false</inherited>
                <executions>
                    <execution>
                    <phase>validate</phase>
                        <goals>
                            <goal>resolve-kafka-range</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <groupId>org.apache.kafka</groupId>
                    <artifactId>kafka-clients</artifactId>
                    <versionRange>${versionRange}</versionRange>
                    <newPomFile>${installed.pom.file}</newPomFile>
                    <skip>${skip.maven.resolver.plugin}</skip>
                    <failIfCCSNotfound>true</failIfCCSNotfound>
                    <failIfCENotfound>${fail.if.ce-kafka.version.not.found}</failIfCENotfound>
                </configuration>
            </plugin>
            <!-- This custom install plugin is run so that we install the common
                artifact using a the pom with the kafka and ce-kafka version
                range properties resolved to a specific version.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven-install-plugin.version}</version>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>custom-install</id>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <phase>${custom.install.phase}</phase>
                        <configuration>
                            <file>${installed.pom.file}</file>
                            <groupId>io.confluent</groupId>
                            <artifactId>common-parent</artifactId>
                            <packaging>pom</packaging>
                            <version>${project.version}</version>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- This custom deploy plugin is run so that when we deploy the common
                artifact we use a version of the pom file with the kafka and
                ce-kafka version range properties resolved to a specific version.
            -->
            <plugin>
                <groupId>com.coderplus.maven.plugins</groupId>
                <artifactId>copy-rename-maven-plugin</artifactId>
                <version>${coderplus.plugin.version}</version>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>copy-file</id>
                        <phase>${custom.deploy.phase}</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <overWrite>true</overWrite>
                            <sourceFile>${basedir}/${installed.pom.file}</sourceFile>
                            <destinationFile>${basedir}/pom.xml</destinationFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- Enable source jars only if a corresponding safe license file is found - projects
        need to opt in by having one of the matching license files. Because maven activations
        don't support multiple files, we need to have a separate profile per license. Finally, to
        support both single and multi-module projects, we need to check for the files relative to
        both the project and its parent directory (in multi-module projects we're interested in
        source jars in the child modules, so need to look one level up). This has some risk
        (checking one level above the project/repo directory) and requires some redundancy, but
        seems to work sufficiently well.
        -->
        <profile>
            <id>attach-sources-apache</id>
            <activation>
                <file>
                    <exists>LICENSE-Apache</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>attach-sources-apache-parent</id>
            <activation>
                <file>
                    <exists>../LICENSE-Apache</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>attach-sources-confluent</id>
            <activation>
                <file>
                    <exists>LICENSE-ConfluentCommunity</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>attach-sources-confluent-parent</id>
            <activation>
                <file>
                    <exists>../LICENSE-ConfluentCommunity</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>env.BUILD_NUMBER</name>
                </property>
            </activation>
            <properties>
                <dependency.check.skip>false</dependency.check.skip>
                <!-- During CI builds we do not want to execute the resolver plugin
                    or the additional install and deploy steps as they are only
                    needed when building locally.
                -->
                <skip.maven.resolver.plugin>true</skip.maven.resolver.plugin>
                <custom.install.phase>none</custom.install.phase>
                <custom.deploy.phase>none</custom.deploy.phase>
                <!-- During CI builds we need to fail if we are unable to resolve
                    the latest version of ce-kafka artifacts.
                -->
                <fail.if.ce-kafka.version.not.found>true</fail.if.ce-kafka.version.not.found>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-checkstyle-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <configuration>
                            <effort>Max</effort>
                            <threshold>High</threshold>
                            <xmlOutput>true</xmlOutput>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <configuration>
                            <xmlOutput>true</xmlOutput>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <configuration>
                            <configLocation>${checkstyle.config.location}</configLocation>
                            <suppressionsLocation>${checkstyle.suppressions.location}</suppressionsLocation>
                            <sourceDirectories>
                                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                            </sourceDirectories>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>false</failsOnError>
                            <failOnViolation>true</failOnViolation>
                            <includeResources>false</includeResources>
                            <includeTestResources>false</includeTestResources>
                        </configuration>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>checkstyle-aggregate</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
        <profile>
            <!-- org.owasp:dependency-check-maven >= 4.0.0 will not work with JDK7 so it must be activated in a JDK>=1.8 profile.
                 Developers can always pass -Ddependency.check.skip=true on the CLI to speed things up during development -->
            <id>dependency-check</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <build>
              <plugins>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${dependency.check.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>io.confluent</groupId>
                            <artifactId>build-tools</artifactId>
                            <version>${io.confluent.common.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <suppressionFiles>
                            <suppressionFile>${dependency.check.suppressions.location}</suppressionFile>
                        </suppressionFiles>
                        <cveUrlModified>https://s3-us-west-2.amazonaws.com/confluent-packaging-tools/nvd.nist.gov/nvdcve-1.1-modified.json.gz</cveUrlModified>
                        <cveUrlBase>https://s3-us-west-2.amazonaws.com/confluent-packaging-tools/nvd.nist.gov/nvdcve-1.1-%d.json.gz</cveUrlBase>
                        <!-- Don't use this except in special circumstances as a way to disable this check on the command
                             line. Downstream projects should all be running this as part of their normal builds and should
                             not override this flag in their pom file. -->
                        <skip>${dependency.check.skip}</skip>
                        <skipSystemScope>true</skipSystemScope>
                        <skipProvidedScope>true</skipProvidedScope>
                        <skipTestScope>true</skipTestScope>
                        <format>xml</format>
                        <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                        <ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
               </plugins>
            </build>
        </profile>
        <profile>
            <id>java-9+</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <!-- Use release instead of source/target in Java 9 or higher -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <inherited>true</inherited>
                        <configuration>
                            <release>${java.version}</release>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>docker</id>
            <activation>
                <property>
                    <name>env.DOCKER_HOST</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-assembly-plugin-boilerplate</id>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <phase>process-sources</phase>
                                <configuration>
                                    <includeArtifactIds>assembly-plugin-boilerplate</includeArtifactIds>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>make-assembly-for-docker</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <skipAssembly>${docker.skip-build}</skipAssembly>
                                    <descriptors>
                                        <descriptor>target/dependency/assembly-plugin-boilerplate-${io.confluent.common.version}/common-docker-package.xml</descriptor>
                                    </descriptors>
                                    <archive>
                                        <manifest>
                                            <mainClass>${main-class}</mainClass>
                                        </manifest>
                                    </archive>
                                    <attach>false</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-licenses-for-docker</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <skip>${docker.skip-build}</skip>
                                    <mainClass>io.confluent.licenses.LicenseFinder</mainClass>
                                    <arguments>
                                        <!-- Note use of development instead of package so we pick up all dependencies.
                                             This assumes both subprojects will be packaged together. -->
                                        <argument>-i ${project.build.directory}/${project.build.finalName}-package/share/java/${project.artifactId}</argument>
                                        <argument>-f</argument>
                                        <argument>-h ${project.build.directory}/${project.build.finalName}-package/share/doc/${project.artifactId}/licenses.html</argument>
                                        <argument>-l ${project.build.directory}/${project.build.finalName}-package/share/doc/${project.artifactId}/licenses</argument>
                                        <argument>-n ${project.build.directory}/${project.build.finalName}-package/share/doc/${project.artifactId}/notices</argument>
                                        <argument>-x licenses-${io.confluent.license-file-generator.version}.jar</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>python-docker-tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <skip>${docker.skip-test}</skip>
                                    <environmentVariables>
                                        <TOX_TESTENV_PASSENV>DOCKER_REGISTRY DOCKER_TAG DOCKER_TEST_REGISTRY DOCKER_TEST_TAG DOCKER_HOST</TOX_TESTENV_PASSENV>
                                        <DOCKER_REGISTRY>${docker.registry}</DOCKER_REGISTRY>
                                        <DOCKER_TAG>${docker.tag}</DOCKER_TAG>
                                        <DOCKER_TEST_REGISTRY>${docker.test-registry}</DOCKER_TEST_REGISTRY>
                                        <DOCKER_TEST_TAG>${docker.test-tag}</DOCKER_TEST_TAG>
                                    </environmentVariables>
                                    <executable>tox</executable>
                                </configuration>
                            </execution>
                        </executions>

                        <configuration>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>true</includePluginDependencies>
                            <executableDependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                            </executableDependency>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                                <version>${io.confluent.license-file-generator.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>

                    <plugin>
                        <groupId>com.spotify</groupId>
                        <artifactId>dockerfile-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>package</id>
                                <goals>
                                    <goal>build</goal>
                                </goals>
                                <configuration>
                                    <buildArgs>
                                        <ARTIFACT_ID>${project.artifactId}</ARTIFACT_ID>
                                        <BUILD_NUMBER>${BUILD_NUMBER}</BUILD_NUMBER>
                                        <DOCKER_REGISTRY>${docker.registry}</DOCKER_REGISTRY>
                                        <DOCKER_TAG>${docker.tag}</DOCKER_TAG>
                                        <DOCKER_UPSTREAM_REGISTRY>${docker.upstream-registry}</DOCKER_UPSTREAM_REGISTRY>
                                        <DOCKER_UPSTREAM_TAG>${docker.upstream-tag}</DOCKER_UPSTREAM_TAG>
                                        <GIT_COMMIT>${GIT_COMMIT}</GIT_COMMIT>
                                        <PROJECT_VERSION>${project.version}</PROJECT_VERSION>
                                        <CONFLUENT_VERSION>${CONFLUENT_VERSION}</CONFLUENT_VERSION>
                                        <CONFLUENT_PACKAGES_REPO>${CONFLUENT_PACKAGES_REPO}</CONFLUENT_PACKAGES_REPO>
                                        <CONFLUENT_PLATFORM_LABEL>${CONFLUENT_PLATFORM_LABEL}</CONFLUENT_PLATFORM_LABEL>
                                        <CONFLUENT_DEB_VERSION>${CONFLUENT_DEB_VERSION}</CONFLUENT_DEB_VERSION>
                                        <ALLOW_UNSIGNED>${ALLOW_UNSIGNED}</ALLOW_UNSIGNED>
                                        <SCALA_VERSION>${kafka.scala.version}</SCALA_VERSION>
                                    </buildArgs>
                                    <skip>${docker.skip-build}</skip>
                                    <tag>${docker.tag}</tag>
                                    <repository>${docker.registry}confluentinc/${project.artifactId}</repository>
                                    <pullNewerImage>${docker.pull-image}</pullNewerImage>
                                    <dockerfile>${docker.file}</dockerfile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <distributionManagement>
        <repository>
            <id>aws-release</id>
            <name>AWS Release Repository</name>
            <url>${confluent.release.repo}</url>
        </repository>
        <snapshotRepository>
            <id>aws-snapshot</id>
            <name>AWS Snapshot Repository</name>
            <url>${confluent.snapshot.repo}</url>
        </snapshotRepository>
    </distributionManagement>
</project>
