<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.confluent</groupId>
        <artifactId>rest-utils-parent</artifactId>
        <version>6.2.0</version>
    </parent>

    <groupId>io.confluent</groupId>
    <artifactId>confluent-security-plugins</artifactId>
    <packaging>pom</packaging>
    <version>6.2.0</version>

    <modules>
        <module>confluent-kafka-rest-security-plugin</module>
        <module>confluent-security-plugins-common</module>
        <module>package-kafka-rest-security-plugin</module>
        <module>confluent-schema-registry-security-plugin</module>
        <module>confluent-schema-registry-validator-plugin</module>
        <module>confluent-connect-security-plugin</module>
        <module>package-schema-registry-security-plugin</module>
        <module>package-schema-registry-validator-plugin</module>
        <module>package-connect-security-plugin</module>
        <module>confluent-ksql-security-plugin</module>
        <module>package-ksql-security-plugin</module>
    </modules>
    <name>confluent-security-plugins</name>
    <organization>
        <name>Confluent, Inc.</name>
        <url>http://confluent.io</url>
    </organization>
    <url>http://confluent.io</url>
    <description>
      Security plugins for Confluent products.
    </description>

    <scm>
        <connection>scm:git:git://github.com/confluentinc/confluent-security-plugins.git</connection>
        <developerConnection>scm:git:git@github.com:confluentinc/confluent-security-plugins.git</developerConnection>
        <url>https://github.com/confluentinc/confluent-security-plugins</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <commons-io.version>2.4</commons-io.version>
        <bc-fips.min.version>1.0.2</bc-fips.min.version>
        <bcpkix-fips.min.version>1.0.3</bcpkix-fips.min.version>
        <bctls-fips.min.version>1.0.10</bctls-fips.min.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <io.confluent.confluent-security-plugins.version>6.2.0</io.confluent.confluent-security-plugins.version>
        <io.confluent.kafka-rest.version>${confluent.version.range}</io.confluent.kafka-rest.version>
        <io.confluent.schema-registry.version>${confluent.version.range}</io.confluent.schema-registry.version>
        <project.package.home>target/${project.artifactId}-${io.confluent.confluent-security-plugins.version}-package</project.package.home>
    </properties>

    <repositories>
        <repository>
            <id>confluent</id>
            <name>Confluent</name>
            <url>${confluent.maven.repo}</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Use a repackaged version of log4j with security patches. Default log4j v1.2 is a transitive dependency of slf4j-log4j12, but it is excluded in common/pom.xml -->
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>confluent-log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <!--
          The following is for excluding Bouncy Castle Java security provider jars from being included.
          We use scope “provided” to make FIPS provider jars not be considered transitive dependencies, thus not being
          not included in runtime execution classpath where they conflict with non-FIPS jar files used by testing code.
          In order for the “provided” FIPS jars to not be transitively pulled, we have to specify a “valid” version range
          so that maven will not pull the FIPS jars itself. Because we never want FIPS jars to be pulled in this project,
          we specify a version range starting with the current version, to all “future” versions. Thus, upstream updates
          to FIPS versions will not affect this project.
        -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bc-fips</artifactId>
            <version>[${bc-fips.min.version},)</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-fips</artifactId>
            <version>[${bcpkix-fips.min.version},)</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bctls-fips</artifactId>
            <version>[${bctls-fips.min.version},)</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-rest</artifactId>
                <version>${io.confluent.kafka-rest.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.confluent</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.kafka</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-rest</artifactId>
                <classifier>tests</classifier>
                <version>${io.confluent.kafka-rest.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.confluent</groupId>
                        <artifactId>kafka-json-serializer</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.confluent</groupId>
                        <artifactId>kafka-avro-serializer</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>rest-utils</artifactId>
                <version>${io.confluent.rest-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-json-serializer</artifactId>
                <version>${io.confluent.schema-registry.version}</version>
            </dependency>
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-avro-serializer</artifactId>
                <version>${io.confluent.schema-registry.version}</version>
            </dependency>
            <!-- This is to fix transitive dependency issue while building ducker image for system tests -->
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-log4j-appender</artifactId>
                <version>${ce.kafka.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka_${kafka.scala.version}</artifactId>
                <version>${ce.kafka.version}</version>
                <classifier>test</classifier>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Copied from common/pom.xml, use CE instead of CCS -->
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka_${kafka.scala.version}</artifactId>
                <version>${ce.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>${ce.kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${ce.kafka.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${ce.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>connect-api</artifactId>
                <version>${ce.kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-runtime</artifactId>
                <version>${ce.kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-json</artifactId>
                <version>${ce.kafka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>connect-file</artifactId>
                <version>${ce.kafka.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <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>
                        <configuration>
                            <suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
