<?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.0.15.redhat-00002</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>apicurio-registry-docs</artifactId>
  <packaging>pom</packaging>
  <name>apicurio-registry-docs</name>
  <description>Open Source API &amp; Schema Registry</description>

  <url>https://www.apicur.io/</url>

  <organization>
    <name>Red Hat</name>
    <url>https://www.redhat.com</url>
  </organization>

  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>EricWittmann</id>
      <name>Eric Wittmann</name>
      <email>eric.wittmann@redhat.com</email>
      <organization>Red Hat</organization>
      <roles>
        <role>Project Lead</role>
        <role>Developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <id>jsenko</id>
      <name>Jakub Senko</name>
      <email>m@jsenko.net</email>
      <organization>Red Hat</organization>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <id>alesj</id>
      <name>Aleš Justin</name>
      <email>ajustin@redhat.com</email>
      <organization>Red Hat</organization>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <modules>
    <module>rest-api</module>
  </modules>

  <scm>
    <connection>scm:git:git@github.com:apicurio/apicurio-registry.git</connection>
    <developerConnection>scm:git:git@github.com:apicurio/apicurio-registry.git</developerConnection>
    <url>scm:git:git@github.com:apicurio/apicurio-registry.git</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/apicurio/apicurio-registry/issues</url>
  </issueManagement>

  <properties>
    <projectRoot>${project.basedir}/..</projectRoot>
    <quarkus.version>3.20.1.redhat-00003</quarkus.version>
    <quarkus-operator-sdk.version>7.1.1.redhat-00002</quarkus-operator-sdk.version>
  </properties>

  <dependencies>
    <!-- Fake dependency to ensure that the JAR is already available locally -->
    <dependency>
      <groupId>io.apicurio</groupId>
      <artifactId>apicurio-registry-app</artifactId>
      <version>3.0.15.redhat-00002</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>docs-generation</id>
      <activation>
        <property>
          <name>!skipDocsGen</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>dev.jbang</groupId>
            <artifactId>jbang-maven-plugin</artifactId>
            <version>0.0.8</version>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>run</id>
                <goals>
                  <goal>run</goal>
                </goals>
                <phase>process-resources</phase>
                <configuration>
                  <jbangargs>-cp "${projectRoot}/config-index/definitions/target/classes"</jbangargs>
                  <script>${project.basedir}/generateAllConfigPartial.java</script>
                  <args>
                    <arg>${project.version}</arg>
                    <arg>${project.basedir}</arg>
                    <arg>${project.version}</arg>
                  </args>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
