<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.optaplanner</groupId>
    <artifactId>optaplanner-quarkus-parent</artifactId>
    <version>8.8.0.Final</version>
  </parent>

  <artifactId>optaplanner-quarkus</artifactId>
  <name>OptaPlanner Quarkus - Runtime</name>
  <description>Optimize planning of vehicle routes, employee rosters, maintenance schedules, task assignments, school timetables, conference schedules, etc.</description>

  <properties>
    <java.module.name>org.optaplanner.quarkus</java.module.name>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.optaplanner</groupId>
      <artifactId>optaplanner-core</artifactId>
      <exclusions>
        <!-- Drools dependencies are replaced with Kogito equivalents. -->
        <exclusion>
          <groupId>org.kie</groupId>
          <artifactId>kie-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.kie</groupId>
          <artifactId>kie-internal</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.drools</groupId>
          <artifactId>drools-canonical-model</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.drools</groupId>
          <artifactId>drools-model-compiler</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.drools</groupId>
          <artifactId>drools-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.drools</groupId>
          <artifactId>drools-compiler</artifactId>
        </exclusion>
        <exclusion>
          <!--
            Dynamic is not compatible with GraalVM native compilation.
            org.kie.kogito:drools-core brings in static.
          -->
          <groupId>org.drools</groupId>
          <artifactId>drools-core-dynamic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-drools-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>

    <dependency>
      <groupId>org.graalvm.nativeimage</groupId>
      <artifactId>svm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <annotationProcessorPaths>
            <path>
              <groupId>io.quarkus</groupId>
              <artifactId>quarkus-extension-processor</artifactId>
              <version>${version.io.quarkus}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <!-- TODO enable dependency check later. -->
            <id>analyze-only</id>
            <configuration>
              <failOnWarning>false</failOnWarning>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
