<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.4.10</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>
  <groupId>io.netfoundry</groupId>
  <artifactId>myzrok-orchestration</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>myzrok-orchestration</name>
  <description>Myzrok Orchestration Service</description>

  <properties>
    <myzrok.orchestration.openapi.version>0.6.0</myzrok.orchestration.openapi.version>
    <spring-cloud.version>2024.0.1</spring-cloud.version>
    <jacoco.version>0.8.11</jacoco.version>
    <sonar.projectKey>netfoundry_myzrok-orchestration</sonar.projectKey>
    <sonar.organization>netfoundry</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.sources>src/main</sonar.sources>
    <sonar.tests>src/test</sonar.tests>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.coverage.exclusions> <!-- coverage only; doesn't exclude other analysis of code -->
    </sonar.coverage.exclusions>
    <sonar.cpd.exclusions> <!-- cpd: copy paste detection; ie, code duplication -->
    </sonar.cpd.exclusions>

    <springdoc-openapi.version>2.8.9</springdoc-openapi.version>
    <snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>
    <maven.compiler.release>21</maven.compiler.release>
    <maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>
    <surefire.reuseForks>false</surefire.reuseForks>
    <java.version>21</java.version>

    <!-- If flyway is run as a Maven task, then it needs to know the location of migration files.
         This should always match the spring.flyway.locations property in the application.properties file. -->
    <flyway.locations>classpath:db/migration,classpath:db/mysql</flyway.locations>
    <openziti.version>0.30.2</openziti.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>3.4.13</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-hateoas</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-bootstrap</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-bridge-brave</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-json</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.retry</groupId>
      <artifactId>spring-retry</artifactId>
    </dependency>

    <!-- NetFoundry Dependencies -->
    <dependency>
      <groupId>io.netfoundry</groupId>
      <artifactId>common-util-framework</artifactId>
      <version>4.1.7</version>
    </dependency>

    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path</artifactId>
      <version>2.9.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-simple</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Previously only on the classpath transitively via io.netfoundry:authorization; versions pinned to what it resolved -->
    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-commons</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>33.4.6-jre</version>
    </dependency>

    <dependency>
      <groupId>com.vdurmont</groupId>
      <artifactId>semver4j</artifactId>
      <version>3.1.0</version>
    </dependency>

    <dependency>
      <groupId>io.netfoundry</groupId>
      <artifactId>messaging-framework</artifactId>
      <version>0.9.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents.client5</groupId>
      <artifactId>httpclient5</artifactId>
    </dependency>

    <!-- Persistence Dependencies -->

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.7.7</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.mysql</groupId>
      <artifactId>mysql-connector-j</artifactId>
    </dependency>

    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-mysql</artifactId>
    </dependency>

    <dependency>
      <groupId>io.github.resilience4j</groupId>
      <artifactId>resilience4j-circuitbreaker</artifactId>
    </dependency>

    <dependency>
      <groupId>io.github.resilience4j</groupId>
      <artifactId>resilience4j-micrometer</artifactId>
    </dependency>


    <!-- Misc. Minor Dependencies -->

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>

    <dependency> <!-- Metrics reporting -->
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-elastic</artifactId>
    </dependency>

    <dependency>
      <groupId>net.jodah</groupId>
      <artifactId>failsafe</artifactId>
      <version>2.4.4</version>
    </dependency>

    <dependency>
      <groupId>com.googlecode.libphonenumber</groupId>
      <artifactId>libphonenumber</artifactId>
      <version>9.0.23</version>
    </dependency>

    <dependency> <!-- Caching -->
      <groupId>com.github.ben-manes.caffeine</groupId>
      <artifactId>caffeine</artifactId>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
    </dependency>

    <dependency>
      <groupId>net.logstash.logback</groupId>
      <artifactId>logstash-logback-encoder</artifactId>
      <version>7.4</version>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-csv</artifactId>
    </dependency>

    <dependency>  <!-- utilities for reflection, classpath scanning, etc. (beyond spring) -->
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>0.10.2</version>
    </dependency>

    <dependency> <!-- subnet support (dupes functionality of ipaddress) -->
      <groupId>commons-net</groupId>
      <artifactId>commons-net</artifactId>
      <version>3.10.0</version>
    </dependency>

    <!-- OpenApi -->
    <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
      <version>${springdoc-openapi.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-hateoas</artifactId>
      <version>1.8.0</version>
    </dependency>

    <!-- Billing Provider Dependencies -->
    <dependency>
      <groupId>com.chargebee</groupId>
      <artifactId>chargebee-java</artifactId>
      <version>4.2.0</version>
    </dependency>


    <!-- Testing Dependencies -->

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-database-postgresql</artifactId>
      <version>10.0.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jacoco</groupId>
      <artifactId>org.jacoco.agent</artifactId>
      <version>${jacoco.version}</version>
      <classifier>runtime</classifier>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-testcontainers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
      <version>1.21.3</version>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>mysql</artifactId>
      <version>1.21.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>postgresql</artifactId>
      <version>1.21.3</version>
      <scope>test</scope>
    </dependency>

    <!-- In-process Postgres for zrok's DB under the pipeline-test profile, where CI has no Docker for Testcontainers.
         See PipelineZrokPostgresEnvironmentPostProcessor. -->
    <dependency>
      <groupId>io.zonky.test</groupId>
      <artifactId>embedded-postgres</artifactId>
      <version>2.1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.zonky.test.postgres</groupId>
      <artifactId>embedded-postgres-binaries-linux-arm64v8</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.zonky.test.postgres</groupId>
      <artifactId>embedded-postgres-binaries-darwin-arm64v8</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-tracing-test</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Documentation Dependencies -->

    <dependency>
      <groupId>capital.scalable</groupId>
      <artifactId>spring-auto-restdocs-core</artifactId>
      <version>2.0.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.restdocs</groupId>
      <artifactId>spring-restdocs-mockmvc</artifactId>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.zonky.test.postgres</groupId>
        <artifactId>embedded-postgres-binaries-bom</artifactId>
        <version>17.5.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <build>
    <resources>
      <resource>
        <!-- Apply property filtering on the openapi yaml files to set the version -->
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>static/docs/*.yaml</include>
          <include>application*.properties</include>  <!-- Spring Boot plugin adds these by default -->
          <include>application*.yml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>static/docs/*.yaml</exclude>
          <exclude>application*.properties</exclude>
          <exclude>application*.yml</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <!--  provides Spring Boot support in Maven, letting you package executable jar or war archives and run an application “in-place” -->
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <requiresUnpack>
            <dependency>
              <groupId>com.goterl</groupId>
              <artifactId>lazysodium-java</artifactId>
            </dependency>
          </requiresUnpack>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>build-info</goal>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- will provide git information in the healthcheck endpoint -->
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>4.9.10</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>21</source>
          <target>21</target>
          <compilerArgs>--enable-preview</compilerArgs>
        </configuration>
      </plugin>



    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>3.10.0.2594</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <repositories>
    <repository>
      <id>maven_central</id>
      <name>Maven Central</name>
      <url>https://repo.maven.apache.org/maven2/</url>
    </repository>
  </repositories>


  <profiles>
    <!-- Stop a developer's SPRING_PROFILES_ACTIVE=development leaking into tests. Scoped to that value only so
         CI's SPRING_PROFILES_ACTIVE (e.g. pipeline-test, which skips Testcontainers) is never overridden. -->
    <profile>
      <id>local-dev-test-profile</id>
      <activation>
        <property>
          <name>env.SPRING_PROFILES_ACTIVE</name>
          <value>development</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <environmentVariables>
                <SPRING_PROFILES_ACTIVE>test</SPRING_PROFILES_ACTIVE>
              </environmentVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>

          <!-- Surefire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application. It generates reports. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.5.3</version>
            <configuration>
              <rerunFailingTestsCount>1</rerunFailingTestsCount>
              <!-- Keep JaCoCo’s agent args first so coverage still works -->
              <argLine>
                ${argLine} -Xms1g -Xmx4g -XX:MaxMetaspaceSize=1g -XX:+UseG1GC
              </argLine>

              <!-- Optional: stabilize forking so memory is reused across tests -->
              <forkCount>1</forkCount>
              <reuseForks>true</reuseForks>
              <includes>
                <include>**/*Test.java,*Test.java</include>
              </includes>
              <systemPropertyVariables>
                <org.springframework.restdocs.outputDir>
                  ${project.build.directory}/generated-snippets
                </org.springframework.restdocs.outputDir>
                <org.springframework.restdocs.javadocJsonDir>
                  ${project.build.directory}/generated-javadoc-json
                </org.springframework.restdocs.javadocJsonDir>
                <systemProperty>
                  <name>spring.test.context.cache.maxSize</name>
                  <value>16</value>
                </systemProperty>
              </systemPropertyVariables>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
              <reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
              <execution>
                <id>post-unit-test</id>
                <phase>verify</phase>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <!-- Sets the path to the file which contains the execution
                    data. -->
                  <dataFile>target/jacoco.exec</dataFile>
                  <!-- Sets the output directory for the code coverage report. -->
                  <outputDirectory>target/jacoco-ut</outputDirectory>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.16.1</version>
              </dependency>
              <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.16.1</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>dependency_check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>9.0.9</version>
            <configuration>
              <!-- Fail Build On CVSS core more then 8.0 which is HIGH-->
              <!-- <failBuildOnCVSS>8</failBuildOnCVSS> -->
              <!-- Generate all report formats -->
              <format>ALL</format>
              <!-- Don't use Nexus Analyzer -->
              <retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
              <centralAnalyzerEnabled>false</centralAnalyzerEnabled>
              <ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled>
              <!-- Am I the latest version? -->
              <versionCheckEnabled>true</versionCheckEnabled>
              <!--suppression Files -->
              <suppressionFiles>owasp/suppressed.xml</suppressionFiles>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xml-maven-plugin</artifactId>
            <configuration>
              <transformationSets>
                <transformationSet>
                  <dir>${project.build.directory}</dir>
                  <includes>
                    <include>dependency-check-report.xml</include>
                  </includes>
                  <stylesheet>owasp/dependencycheck_to_pmd.xsl</stylesheet>
                  <outputDir>target</outputDir>
                  <fileMappers>
                    <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                      <targetName>dependency-check-report-pmd.xml</targetName>
                    </fileMapper>
                  </fileMappers>
                </transformationSet>
              </transformationSets>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>net.sf.saxon</groupId>
                <artifactId>saxon</artifactId>
                <version>8.7</version>
              </dependency>
            </dependencies>
          </plugin>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>docs</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-sources</phase>
                <goals>
                  <goal>delombok</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <addOutputDirectory>false</addOutputDirectory>
              <outputDirectory>${project.build.directory}/generated-sources/delombok</outputDirectory>
              <sourceDirectory>src/main/java</sourceDirectory>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
              </dependency>
            </dependencies>
          </plugin>

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.6.3</version>
            <configuration>
              <sourcepath>${project.build.directory}/generated-sources/delombok</sourcepath>
              <additionalJOption>-Xdoclint:none</additionalJOption>
              <verbose>true</verbose>
            </configuration>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>generate-javadoc-json</id>
                <phase>compile</phase>
                <goals>
                  <goal>javadoc-no-fork</goal>
                  <goal>test-javadoc-no-fork</goal>
                </goals>
                <configuration>
                  <doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet>
                  <docletArtifact>
                    <groupId>capital.scalable</groupId>
                    <artifactId>spring-auto-restdocs-json-doclet-jdk9</artifactId>
                    <version>2.0.5</version>
                  </docletArtifact>
                  <destDir>generated-javadoc-json</destDir>
                  <reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
                  <useStandardDocletOptions>false</useStandardDocletOptions>
                  <show>package</show>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>generate-docs</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <backend>html</backend>
                  <doctype>book</doctype>
                  <sourceDirectory>src/main/asciidoc</sourceDirectory>
                  <sourceDocumentName>index.adoc</sourceDocumentName>
                  <attributes>
                    <snippets>${snippetsDirectory}</snippets>
                    <googleAnalyticsId>G-XZCJBSHKV1</googleAnalyticsId>
                  </attributes>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-generated-api-docs-to-static-docs</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.outputDirectory}/static/v2/docs</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${project.build.directory}/generated-docs</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>exec-maven-plugin</artifactId>
            <groupId>org.codehaus.mojo</groupId>
            <executions>
              <execution><!-- Run our version calculation script -->
                <id>OpenAPI Endpoint Check</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>${basedir}/src/test/resources/openapi/checkForUpdatedPaths.sh</executable>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>myzrokOrchestrationClient</id>
      <properties>
        <openapi-generator-version>6.2.1</openapi-generator-version>
        <myzrokOrchestrationOpenApiUri>${project.build.directory}/classes/static/v1/docs/openapi-v3.yaml</myzrokOrchestrationOpenApiUri>
      </properties>
      <build>
        <plugins>
          <plugin>
            <!-- Skip this plugin by running with -Dcodegen.skip -->
            <groupId>org.openapitools</groupId>
            <artifactId>openapi-generator-maven-plugin</artifactId>
            <version>${openapi-generator-version}</version>
            <executions>
              <execution>
                <id>genClient</id>
                <goals>
                  <goal>generate</goal>
                </goals>
                <configuration>
                  <inputSpec>${myzrokOrchestrationOpenApiUri}</inputSpec>
                  <generatorName>java</generatorName>
                  <output>${project.build.directory}/client</output>
                  <apiPackage>io.netfoundry.myzrok-orchestration.client.api</apiPackage>
                  <modelPackage>io.netfoundry.myzrok-orchestration.client.model</modelPackage>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}-client</artifactId>
                  <artifactVersion>${myzrok.orchestration.openapi.version}-SNAPSHOT</artifactVersion>
                  <generateModelTests>false</generateModelTests>
                  <generateApiTests>false</generateApiTests>
                  <library>native</library>
                  <configOptions>
                    <serializationLibrary>jackson</serializationLibrary>
                    <dateLibrary>java8</dateLibrary>
                    <java8>true</java8>
                  </configOptions>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
