<?xml version="1.0"?>
<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">
    <parent>
        <groupId>io.debezium</groupId>
        <artifactId>debezium-server</artifactId>
        <version>3.3.2.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>debezium-server-dist</artifactId>
    <name>Debezium Server Distribution</name>
    <packaging>jar</packaging>

    <properties>
        <assembly.descriptor>server-distribution</assembly.descriptor>
        <quarkus.package.type>legacy-jar</quarkus.package.type>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.debezium</groupId>
            <artifactId>debezium-server-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <version>${quarkus.version.runtime}</version>
                <configuration>
                    <systemProperties>
                        <quarkus.kubernetes-config.secrets.enabled>true</quarkus.kubernetes-config.secrets.enabled>
                        <!-- Required in order to support SRV protocol in MongoDB connector (due to java drive) -->
                        <quarkus.naming.enable-jndi>true</quarkus.naming.enable-jndi>
                    </systemProperties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>assembly</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.prometheus.jmx</groupId>
                    <artifactId>jmx_prometheus_javaagent</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mariadb</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mysql</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-postgres</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mongodb</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-sqlserver</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-oracle</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-scripting</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-scripting-languages</artifactId>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-kinesis</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-sqs</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-http</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-pubsub</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-pulsar</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-eventhubs</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-redis</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-kafka</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-pravega</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-nats-streaming</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-nats-jetstream</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-infinispan</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-rabbitmq</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-rocketmq</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-milvus</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-qdrant</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-instructlab</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-logging-json</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>${version.assembly.plugin}</version>
                        <executions>
                            <execution>
                                <id>default</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <attach>true</attach>  <!-- we want attach & deploy these to Maven -->
                                    <descriptors>
                                        <descriptor>src/main/resources/assemblies/${assembly.descriptor}.xml</descriptor>
                                    </descriptors>
                                    <tarLongFileMode>posix</tarLongFileMode>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>assembly-prod</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <assembly.descriptor>server-distribution-prod</assembly.descriptor>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>io.prometheus.jmx</groupId>
                    <artifactId>jmx_prometheus_javaagent</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mysql</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mariadb</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-postgres</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-mongodb</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-sqlserver</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-oracle</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-db2</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-scripting</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-scripting-languages</artifactId>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-http</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-redis</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-kafka</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-infinispan</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-logging-json</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>${version.assembly.plugin}</version>
                        <executions>
                            <execution>
                                <id>default</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <attach>true</attach>  <!-- we want attach & deploy these to Maven -->
                                    <descriptors>
                                        <descriptor>src/main/resources/assemblies/${assembly.descriptor}.xml</descriptor>
                                    </descriptors>
                                    <tarLongFileMode>posix</tarLongFileMode>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>include-non-core-connectors</id>
            <activation>
                <property>
                    <name>!skipNonCore</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-cassandra-3</artifactId>
                    <version>${project.parent.version}</version>
                    <classifier>plugin</classifier>
                    <type>zip</type>
                    <exclusions>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-connector-cassandra-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>cassandra-all</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-core-shaded</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-query-builder</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-jmx</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-healthchecks</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-servlets</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-servlet</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.google.guava</groupId>
                            <artifactId>guava</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-json</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-cassandra-5</artifactId>
                    <version>${project.parent.version}</version>
                    <classifier>plugin</classifier>
                    <type>zip</type>
                    <exclusions>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-connector-cassandra-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>cassandra-all</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-core-shaded</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-query-builder</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-jmx</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-healthchecks</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-servlets</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-servlet</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.google.guava</groupId>
                            <artifactId>guava</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-json</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-cassandra-4</artifactId>
                    <version>${project.parent.version}</version>
                    <classifier>plugin</classifier>
                    <type>zip</type>
                    <exclusions>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-connector-cassandra-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>cassandra-all</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-core-shaded</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-query-builder</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-jmx</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-healthchecks</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-servlets</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-servlet</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.google.guava</groupId>
                            <artifactId>guava</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-json</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-dse</artifactId>
                    <version>${project.parent.version}</version>
                    <classifier>plugin</classifier>
                    <type>zip</type>
                    <exclusions>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-connector-cassandra-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.debezium</groupId>
                            <artifactId>debezium-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>cassandra-all</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-annotations</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-core-shaded</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.datastax.oss</groupId>
                            <artifactId>java-driver-query-builder</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-core</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-jmx</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-healthchecks</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>io.dropwizard.metrics</groupId>
                            <artifactId>metrics-servlets</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-servlet</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.google.guava</groupId>
                            <artifactId>guava</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.apache.kafka</groupId>
                            <artifactId>connect-json</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-db2</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-spanner</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-vitess</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-informix</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-ibmi</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-cockroachdb</artifactId>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>
