<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.apicurio</groupId>
    <artifactId>apicurio-registry</artifactId>
    <version>3.3.3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>apicurio-registry-app</artifactId>
  <packaging>jar</packaging>
  <name>Registry :: App</name>

  <properties>
    <projectRoot>${project.basedir}/..</projectRoot>
    <maven.compiler.release>21</maven.compiler.release>
    <groups/>
    <!-- Default empty argLine so that the @{argLine} late-binding reference in
         maven-surefire-plugin resolves to empty when no plugin (e.g., JaCoCo) sets it.
         Without this, Java 25+ treats the literal '@{argLine}' as an arg file reference
         and fails with 'could not open {argLine}'. -->
    <argLine/>
    <!-- Max heap for the forked surefire JVM that runs the tests. -->
    <surefire.maxHeap>4g</surefire.maxHeap>
    <surefire.forkCount>1</surefire.forkCount>
  </properties>

  <dependencies>
    <!-- Projects -->
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-common</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-provider</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-contracts-rules</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-config-definitions</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-config-index</artifactId>
    </dependency>

    <dependency>
      <!-- TODO: Create a parent pom.xml for the extension, otherwise Maven can't resolve module build order properly. -->
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-config-index-deployment</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-utils-import-export</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-protobuf-schema-utilities</artifactId>
    </dependency>

    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-common</artifactId>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-protobuf</artifactId>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-avro</artifactId>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-json</artifactId>
    </dependency>

    <!-- Quarkus Dependencies -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-undertow</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-micrometer-registry-prometheus</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.ben-manes.caffeine</groupId>
      <artifactId>caffeine</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-opentelemetry</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-vertx</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-oidc</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-elytron-security-properties-file</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-jwt</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-scheduler</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-context-propagation</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-client-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-logging-json</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-fault-tolerance</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-kubernetes-client</artifactId>
    </dependency>

    <!-- Persistence -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-agroal</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-mysql</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-h2</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jdbc-mssql</artifactId>
    </dependency>

    <!-- Third Party Libraries -->
    <dependency>
      <groupId>io.strimzi</groupId>
      <artifactId>kafka-oauth-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.semver4j</groupId>
      <artifactId>semver4j</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>

    <!-- Elasticsearch Java client for content search indexing -->
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-elasticsearch-java-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.yaml</groupId>
          <artifactId>snakeyaml</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>${snakeyaml.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>${commons-beanutils.version}</version>
    </dependency>

    <!-- Test Only -->
    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-avro-serializer</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-protobuf-serializer</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-json-schema-serializer</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-connect-avro-converter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-test-common</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-java-sdk</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-v2-java-sdk</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-java-sdk-common</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-resolver</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-asyncapi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-openapi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-graphql</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-xml</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-xsd</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-wsdl</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-schema-util-iceberg</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.kiota</groupId>
      <artifactId>kiota-http-jdk</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.kiota</groupId>
      <artifactId>kiota-http-vertx</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-utils-tests</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.strimzi</groupId>
      <artifactId>strimzi-test-container</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j-impl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.github.dasniko</groupId>
      <artifactId>testcontainers-keycloak</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.zonky.test</groupId>
      <artifactId>embedded-postgres</artifactId>
      <version>${embedded-postgres.version}</version>
      <!--$NO-MVN-MAN-VER$-->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-mssqlserver</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-mysql</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk-testing</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-test-kubernetes-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-avro-serde-kafka</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-protobuf-serde-kafka</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-jsonschema-serde-kafka</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-avro-serde-pulsar</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-serde-common</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-serde-kafka-common</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-serde-common-avro</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-serde-common-jsonschema</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-maven-plugin</artifactId>
      <type>maven-plugin</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>raml-test-micro-service</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources-unfiltered</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <filtering>true</filtering>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <filtering>false</filtering>
        <directory>src/test/resources-unfiltered</directory>
      </testResource>
    </testResources>

    <pluginManagement>
      <plugins>

      <plugin>
        <groupId>io.apicurio</groupId>
        <artifactId>apicurio-registry-maven-plugin</artifactId>
        <version>${project.version}</version>
      </plugin>

      <plugin>
        <groupId>io.apicurio</groupId>
        <artifactId>apicurio-codegen-maven-plugin</artifactId>
        <version>${version.apicurio-codegen-plugin}</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${version.build.helper.maven.plugin}</version>
      </plugin>

      <plugin>
        <groupId>io.github.ascopes</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>${proto-plugin.version}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-maven-plugin</artifactId>
        <version>${avro.version}</version>
      </plugin>

      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <annotationProcessorPaths>
            <path>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <version>${lombok.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
            </goals>
          </execution>
          <!-- Second build producing a Quarkus "mutable-jar" (re-augmentable) distribution in
               target/mutable/quarkus-app. It is the basis of the "-mutable" container image, which
               lets deployers add Java providers for custom artifact types (jars dropped into
               quarkus-app/providers) without rebuilding the registry. Enabled by -Dfull.
               NOTE: do not set quarkus.package.output-directory here - plugin properties are recorded
               in quarkus/build-system.properties and replayed at re-augmentation time. -->
          <execution>
            <id>build-mutable</id>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <skip>${apicurio.mutable-jar.skip}</skip>
              <bootstrapId>mutable</bootstrapId>
              <buildDir>${project.build.directory}/mutable</buildDir>
              <properties>
                <quarkus.package.jar.type>mutable-jar</quarkus.package.jar.type>
                <quarkus.package.jar.user-providers-directory>providers</quarkus.package.jar.user-providers-directory>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <groups>${groups}</groups>
          <!-- Fork count is overridable per CI shard with -Dsurefire.forkCount=N (e.g. the
               app-rest-v3 shard uses 2). Quarkus tests boot on random ports, so concurrent
               forks do not collide. Default stays 1 for local runs. -->
          <forkCount>${surefire.forkCount}</forkCount>
          <!-- This, not MAVEN_OPTS, is the heap the tests actually run in: surefire forks a JVM and
               MAVEN_OPTS only sizes the Maven process that spawns it. Override per CI shard with
               -Dsurefire.maxHeap=<size>. See issue #9265. -->
          <argLine>@{argLine} -Xmx${surefire.maxHeap}</argLine>
          <forkedProcessExitTimeoutInSeconds>1800</forkedProcessExitTimeoutInSeconds>
          <systemPropertyVariables>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
            <org.jboss.logging.provider>jboss</org.jboss.logging.provider>
            <project.build.directory>${project.build.directory}</project.build.directory>
            <!-- Prevent OTel SPI conflict between Quarkus ContextStorageProvider and SDK testing -->
            <io.opentelemetry.context.contextStorageProvider>default</io.opentelemetry.context.contextStorageProvider>
            <!-- Avro 1.12.2 rejects classes not on the trusted list during reflection-based serde -->
            <org.apache.avro.SERIALIZABLE_PACKAGES>ch.mobi.lead.leadfall,com.kubetrade.schema.trade,io.apicurio.registry.support</org.apache.avro.SERIALIZABLE_PACKAGES>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-test-classes</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>assembly</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <finalName>${project.artifactId}-${project.version}</finalName>
              <attach>true</attach>
              <descriptors>
                <descriptor>src/main/assembly/assembly.xml</descriptor>
              </descriptors>
              <archiverConfig>
                <defaultDirectoryMode>0755</defaultDirectoryMode>
              </archiverConfig>
              <tarLongFileMode>${tar.long.file.mode}</tarLongFileMode>
            </configuration>
          </execution>
          <!-- Tarball of the mutable-jar distribution (see build-mutable above); not attached/deployed -->
          <execution>
            <id>assembly-mutable</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <skipAssembly>${apicurio.mutable-jar.skip}</skipAssembly>
              <finalName>${project.artifactId}-${project.version}</finalName>
              <attach>false</attach>
              <descriptors>
                <descriptor>src/main/assembly/assembly-mutable.xml</descriptor>
              </descriptors>
              <archiverConfig>
                <defaultDirectoryMode>0755</defaultDirectoryMode>
              </archiverConfig>
              <tarLongFileMode>${tar.long.file.mode}</tarLongFileMode>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.apicurio</groupId>
        <artifactId>apicurio-codegen-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-api-ccompat-v3</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <projectSettings>
                <javaPackage>io.apicurio.registry.ccompat.rest.v7</javaPackage>
                <generatesOpenApi>false</generatesOpenApi>
                <capitalizeEnumValues>false</capitalizeEnumValues>
              </projectSettings>
              <inputSpec>${project.basedir}/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v7/openapi.json</inputSpec>
            </configuration>
          </execution>
          <execution>
            <id>generate-api-ccompat-v8</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <projectSettings>
                <javaPackage>io.apicurio.registry.ccompat.rest.v8</javaPackage>
                <generatesOpenApi>false</generatesOpenApi>
                <capitalizeEnumValues>false</capitalizeEnumValues>
              </projectSettings>
              <inputSpec>${project.basedir}/src/main/resources-unfiltered/META-INF/resources/api-specifications/ccompat/v8/openapi.json</inputSpec>
            </configuration>
          </execution>
          <execution>
            <id>generate-api-iceberg-v1</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <projectSettings>
                <javaPackage>io.apicurio.registry.iceberg.rest.v1</javaPackage>
                <generatesOpenApi>false</generatesOpenApi>
                <capitalizeEnumValues>false</capitalizeEnumValues>
              </projectSettings>
              <inputSpec>${project.basedir}/src/main/resources-unfiltered/META-INF/resources/api-specifications/iceberg/v1/openapi.json</inputSpec>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>addSource</id>
            <goals>
              <goal>add-source</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <sources>
                <source>${project.basedir}/target/generated-sources/jaxrs</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>io.github.ascopes</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>gencode</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <sourceDirectories>
                <sourceDirectory>./src/test/resources/schema</sourceDirectory>
              </sourceDirectories>
              <protoc>${protobuf.version}</protoc>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>schema</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <stringType>String</stringType>
              <imports>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/AvroSchemaE.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/AvroSchemaA.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/AvroSchemaD.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/AvroSchemaC.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/AvroSchemaB.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/serde/LeadFallErstellen.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/ccompat/rest/subrecord.avsc</import>
                <import>${project.basedir}/src/test/resources/io/apicurio/registry/ccompat/rest/record.avsc</import>
              </imports>
              <sourceDirectory>${project.basedir}/src/test/resources/io/apicurio/registry/serde/</sourceDirectory>
              <outputDirectory>${project.basedir}/target/generated-test-sources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
            <!-- Copy the v3 OpenAPI spec from common module to output directory.
                 This replaces the maven-dependency-plugin unpack execution which fails during the build
                 (e.g., generate-resources phase) due to MDEP-98, because the sibling artifact has not been packaged into a JAR yet. -->
          <execution>
            <id>copy-openapi-from-common</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.parent.basedir}/common/src/main/resources/META-INF</directory>
                  <includes>
                    <include>openapi.json</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
          <!-- Copy the v3 OpenAPI spec to the api-specifications path served by the Swagger UI.
               This keeps it in sync with the canonical spec in the common module. -->
          <execution>
            <id>copy-openapi-to-api-docs</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>process-resources</phase>
              <configuration>
                <outputDirectory>${project.build.outputDirectory}/META-INF/resources/api-specifications/registry/v3</outputDirectory>
                <resources>
                <resource>
                  <directory>${project.build.outputDirectory}/META-INF</directory>
                  <includes>
                    <include>openapi.json</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-dist</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>prepare-package</phase>
              <configuration>
                <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                <resources>
                <resource>
                  <directory>${project.basedir}/target/generated-test-sources/protobuf/</directory>
                  <filtering>false</filtering>
                  <excludes/>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


</project>
