<?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>io.helidon.applications</groupId>
    <artifactId>helidon-mp</artifactId>
    <version>4.5.0</version>
    <relativePath/>
  </parent>
  <groupId>dodex-helidon</groupId>
  <artifactId>dodex-helidon-mp</artifactId>
  <version>1.1.0</version>

  <properties>
    <helidon.version>4.5.0</helidon.version>
    <log4j.version>2.26.1</log4j.version>
    <slf4j.version>2.0.18</slf4j.version>
    <kotlin.version>2.4.0</kotlin.version>
    <version.plugin.jar>3.4.2</version.plugin.jar>
    <mainClass>dmo.fs.server.DodexMain</mainClass>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
    <version.lib.google-protobuf>4.35.1</version.lib.google-protobuf>
    <version.lib.grpc>1.82.1</version.lib.grpc>
    <hibernate.version>7.4.3.Final</hibernate.version>
    <maven.compiler.target>25</maven.compiler.target>
    <maven.compiler.source>25</maven.compiler.source>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.helidon.microprofile.grpc</groupId>
      <artifactId>helidon-microprofile-grpc-server</artifactId>
      <version>${helidon.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.grpc</groupId>
      <artifactId>helidon-microprofile-grpc-tracing</artifactId>
      <version>${helidon.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.grpc</groupId>
      <artifactId>helidon-microprofile-grpc-client</artifactId>
      <version>${helidon.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.scheduling</groupId>
      <artifactId>helidon-scheduling</artifactId>
      <version>${helidon.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.bundles</groupId>
      <artifactId>helidon-microprofile-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.health</groupId>
      <artifactId>helidon-microprofile-health</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.json.bind</groupId>
      <artifactId>jakarta.json.bind-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-binding</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.integrations.cdi</groupId>
      <artifactId>helidon-integrations-cdi-hibernate</artifactId>
      <version>${helidon.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.integrations.cdi</groupId>
      <artifactId>helidon-integrations-cdi-datasource-hikaricp</artifactId>
      <version>${helidon.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.enterprise</groupId>
      <artifactId>jakarta.enterprise.cdi-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.inject</groupId>
      <artifactId>jakarta.inject-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.ws.rs</groupId>
      <artifactId>jakarta.ws.rs-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.persistence</groupId>
      <artifactId>jakarta.persistence-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.transaction</groupId>
      <artifactId>jakarta.transaction-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.common</groupId>
      <artifactId>helidon-common</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.integrations.cdi</groupId>
      <artifactId>helidon-integrations-cdi-jta-weld</artifactId>
      <version>${helidon.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.integrations.cdi</groupId>
      <artifactId>helidon-integrations-cdi-jpa</artifactId>
      <version>${helidon.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>8.0.4.Final</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>jakarta.el</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile</groupId>
      <artifactId>helidon-microprofile-cors</artifactId>
    </dependency>
    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>jandex</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.activation</groupId>
      <artifactId>jakarta.activation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <!--version>6.0.3</version-->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.tests</groupId>
      <artifactId>helidon-microprofile-tests-junit5</artifactId>
      <version>4.0.0-M2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.integrations.openapi-ui</groupId>
      <artifactId>helidon-integrations-openapi-ui</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.openapi</groupId>
      <artifactId>helidon-microprofile-openapi</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.microprofile.openapi</groupId>
      <artifactId>microprofile-openapi-api</artifactId>
      <version>3.1.2</version>
    </dependency>
    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-open-api-ui</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.15.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.20.0</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
      <version>2.18.2</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.websocket</groupId>
      <artifactId>helidon-microprofile-websocket</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate.orm</groupId>
      <artifactId>hibernate-community-dialects</artifactId>
      <version>${hibernate.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>io.helidon.logging</groupId>
      <artifactId>helidon-logging-log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.common.testing</groupId>
      <artifactId>helidon-common-testing-junit5</artifactId>
      <version>4.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.webserver.testing.junit5</groupId>
      <artifactId>helidon-webserver-testing-junit5</artifactId>
      <version>4.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile.testing</groupId>
      <artifactId>helidon-microprofile-testing-junit5</artifactId>
      <version>4.0.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.common.testing</groupId>
      <artifactId>helidon-common-testing-http-junit5</artifactId>
      <version>4.3.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.helidon.microprofile</groupId>
      <artifactId>helidon-microprofile-security</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.common</groupId>
      <artifactId>helidon-common-reactive</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>swagger-ui</artifactId>
      <version>5.9.0</version>
    </dependency>
    <dependency>
      <groupId>io.helidon.health</groupId>
      <artifactId>helidon-health-checks</artifactId>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.7.12</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>2.4.240</version>
    </dependency>
    <dependency>
      <groupId>org.mariadb.jdbc</groupId>
      <artifactId>mariadb-java-client</artifactId>
      <version>3.5.9</version>
    </dependency>
    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
      <artifactId>ojdbc11</artifactId>
      <version>23.26.2.0.0</version>
    </dependency>
    <dependency>
      <groupId>com.microsoft.sqlserver</groupId>
      <artifactId>mssql-jdbc</artifactId>
      <version>13.4.0.jre11</version>
    </dependency>
    <dependency>
      <groupId>com.ibm.db2</groupId>
      <artifactId>jcc</artifactId>
      <version>12.1.5.0</version>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.grpc</groupId>
      <artifactId>helidon-grpc-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.webserver</groupId>
      <artifactId>helidon-webserver-grpc</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.grpc</groupId>
      <artifactId>helidon-grpc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.helidon.webclient</groupId>
      <artifactId>helidon-webclient-grpc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jvnet.jaxb2.maven2</groupId>
      <artifactId>maven-jaxb2-plugin</artifactId>
      <version>0.15.3</version>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.12.2</version>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>${kotlin.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-maven-plugin</artifactId>
      <version>${kotlin.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
      <version>${kotlin.version}</version>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>4.10.1</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.7.1</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.6.1</version>
        <configuration>
          <protocArtifact>com.google.protobuf:protoc:${version.lib.google-protobuf}:exe:${os.detected.classifier}
          </protocArtifact>
          <pluginId>grpc-java</pluginId>
          <pluginArtifact>
            io.grpc:protoc-gen-grpc-java:${version.lib.grpc}:exe:${os.detected.classifier}
          </pluginArtifact>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>test-compile</goal>
              <goal>compile-custom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.15.0</version>
        <configuration>
          <annotationProcessorPaths>
            <path>
              <groupId>org.hibernate.orm</groupId>
              <artifactId>hibernate-processor</artifactId>
              <version>7.2.21.Final</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.hibernate.orm</groupId>
            <artifactId>hibernate-processor</artifactId>
            <version>7.2.21.Final</version>
          </dependency>
        </dependencies>
      </plugin>
      <!--Development may be faster with the bsc plugin, comment the maven-compiler-plugin above-->
      <!--The above maven-compiler-plugin with the org.hibernate.orm dependency must be used with any clean startup-->
      <!--      <plugin>-->
      <!--        <groupId>org.bsc.maven</groupId>-->
      <!--        <artifactId>maven-processor-plugin</artifactId>-->
      <!--        <version>5.1</version>-->
      <!--        <executions>-->
      <!--          <execution>-->
      <!--            <id>process</id>-->
      <!--            <goals>-->
      <!--              <goal>process</goal>-->
      <!--            </goals>-->
      <!--            <phase>generate-sources</phase>-->
      <!--            <configuration>-->
      <!--              <processors>-->
      <!--                <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>-->
      <!--              </processors>-->
      <!--            </configuration>-->
      <!--          </execution>-->
      <!--        </executions>-->
      <!--        <dependencies>-->
      <!--          <dependency>-->
      <!--            <groupId>org.hibernate</groupId>-->
      <!--            <artifactId>hibernate-jpamodelgen</artifactId>-->
      <!--            <version>6.3.1.Final</version>-->
      <!--          </dependency>-->
      <!--        </dependencies>-->
      <!--      </plugin>-->

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-libs</id>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.hibernate.orm.tooling</groupId>
        <artifactId>hibernate-enhance-maven-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <failOnError>true</failOnError>
              <enableLazyInitialization>true</enableLazyInitialization>
              <enableDirtyTracking>true</enableDirtyTracking>
            </configuration>
            <goals>
              <goal>enhance</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.evolvedbinary.maven.jvnet</groupId>
        <artifactId>jaxb30-maven-plugin</artifactId>
        <version>0.15.0</version>
        <executions>
          <execution>
            <id>Generate persistence.xml Java objects</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <generatePackage>io.helidon.archetypes.tests.jaxb</generatePackage>
              <markGenerated>true</markGenerated>
              <schemas>
                <schema>
                  <dependencyResource>
                    <groupId>jakarta.persistence</groupId>
                    <artifactId>jakarta.persistence-api</artifactId>
                    <resource>jakarta/persistence/persistence_3_0.xsd</resource>
                  </dependencyResource>
                </schema>
              </schemas>
              <strict>false</strict>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.smallrye</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>make-index</id>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${version.plugin.jar}</version>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>libs</classpathPrefix>
              <mainClass>${mainClass}</mainClass>
              <useUniqueVersions>false</useUniqueVersions>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <version>${kotlin.version}</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>process-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <compilerPlugins>
                <plugin>all-open</plugin>
              </compilerPlugins>
              <sourceDirs>
                <source>${project.basedir}/src/main/kotlin</source>
                <source>${project.basedir}/src/main/java</source>
                <source>${project.basedir}/src/main/resources</source>
              </sourceDirs>
              <pluginOptions>
                <option>all-open:annotation=jakarta.persistence.Entity</option>
              </pluginOptions>
            </configuration>
          </execution>
          <execution>
            <id>test-compile</id>
            <phase>process-test-sources</phase>
            <goals>
              <goal>test-compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <source>${project.basedir}/src/test/kotlin</source>
                <source>${project.basedir}/src/test/java</source>
                <source>${project.basedir}/src/test/resources</source>
              </sourceDirs>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-maven-allopen</artifactId>
            <version>${kotlin.version}</version>
          </dependency>
          <dependency>
            <groupId>org.jetbrains.kotlin.plugin.jpa</groupId>
            <artifactId>org.jetbrains.kotlin.plugin.jpa.gradle.plugin</artifactId>
            <version>2.1.10</version>
            <type>pom</type>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.5.1</version>
        <executions>
          <execution>
          </execution>
        </executions>
        <configuration>
          <executable>maven</executable>
          <!-- optional -->
          <workingDirectory>/tmp</workingDirectory>
          <arguments>
            <argument>-X</argument>
          </arguments>
          <environmentVariables>
            <LANG>en_US</LANG>
          </environmentVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.helidon.build-tools</groupId>
        <artifactId>helidon-cli-maven-plugin</artifactId>
        <version>4.0.23</version>
        <configuration>
          <devLoop>
            <!-- This section defines behavior for full builds. -->
            <fullBuild>
              <!-- The phase to execute on pom file change. -->
              <!-- This is the default phase, here for illustration only. -->
              <phase>process-classes</phase>
              <!-- The maximum number of full build failures to allow before exiting the loop. -->
              <!-- Defaults to Integer.MAX_VALUE -->
              <maxBuildFailures>1024</maxBuildFailures>
            </fullBuild>
            <!-- This section defines behavior for incremental builds. -->
            <incrementalBuild>
              <!-- Specify the goal(s) to execute when any Java source file changes. -->
              <!-- Directories, includes and excludes are specified in maven-compiler-plugin config. -->
              <javaSourceGoals>
                <!-- This is the default goal, here for illustration only. -->
                <goal>compiler:compile</goal>
              </javaSourceGoals>
              <!-- Specify the goal(s) to execute when any resource file changes. -->
              <!-- Directories, includes and excludes are specified in maven-resources-plugin config. -->
              <resourceGoals>
                <!-- This is the default goal, here for illustration only. -->
                <goal>resources:resources</goal>
              </resourceGoals>
              <!-- Specify custom directories to watch and the goal(s) to execute on change. -->
              <customDirectories>
                <!-- Specify a custom directory to watch -->
                <directory>
                  <!-- Specify the directory path -->
                  <path>src/main/kotlin</path>
                  <!-- Specify files to watch in the directory; empty for all files. -->
                  <includes>**/*.kt</includes>
                  <!-- Specify files in the directory not to watch. -->
                  <excludes/>
                  <!-- Specify the goal(s) to execute when a watched file changes. -->
                  <goals>
                    <!--                    <goal>kotlin:compile</goal>-->
                    <goal>compile</goal>
                  </goals>
                </directory>
              </customDirectories>
              <!-- The maximum number of incremental build failures to allow before exiting the loop. -->
              <!-- Defaults to Integer.MAX_VALUE -->
              <maxBuildFailures>1024</maxBuildFailures>
            </incrementalBuild>
            <!-- The maximum number of application failures to allow before exiting the loop. -->
            <!-- Defaults to Integer.MAX_VALUE -->
            <maxApplicationFailures>1024</maxApplicationFailures>
          </devLoop>
	      <appJvmArgs>--sun-misc-unsafe-memory-access=allow</appJvmArgs>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
