<?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>1.6.1.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}</version>
                <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.debezium</groupId>
                    <artifactId>debezium-connector-mysql</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-connector-postgres</artifactId>
                    <scope>runtime</scope>
                </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-server-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>io.debezium</groupId>
                    <artifactId>debezium-server-kinesis</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>
            </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>
    </profiles>
</project>
