<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ // (Copyright) [2017-${current_year}] Confluent, Inc.
  -->

<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>
        <artifactId>schema-registry-plugins</artifactId>
        <groupId>io.confluent</groupId>
        <version>8.0.7</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>package-schema-registry-plugins</artifactId>
    <packaging>pom</packaging>

    <dependencies>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>ruleset-handler</artifactId>
            <version>${io.confluent.schema-registry-plugins.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>schema-exporter</artifactId>
            <version>${io.confluent.schema-registry-plugins.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>schema-importer</artifactId>
            <version>${io.confluent.schema-registry-plugins.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-schema-registry</artifactId>
            <version>${io.confluent.schema-registry.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <!-- CC build profile - includes event-management -->
        <profile>
            <id>cc-build</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.confluent</groupId>
                    <artifactId>schema-registry-event-management</artifactId>
                    <version>${io.confluent.schema-registry-plugins.version}</version>
                </dependency>
            </dependencies>
        </profile>

        <!-- CP build profile - explicitly EXCLUDES event-management -->
        <profile>
            <id>cp-build</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <!-- No event-management dependency here -->
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/development.xml</descriptor>
                        <descriptor>src/assembly/package.xml</descriptor>
                    </descriptors>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>