<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<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">
  <parent>
    <artifactId>sonataflow-quarkus-extension</artifactId>
    <groupId>org.apache.kie.sonataflow</groupId>
    <version>10.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>sonataflow-quarkus</artifactId>
  <name>SonataFlow :: Quarkus Serverless Workflow Extension :: Runtime</name>
  <description>Add SonataFlow Serverless Workflows (SW) capabilities - Includes the Process engine capability</description>

  <properties>
        <java.module.name>org.kie.kogito.serverless.workflow</java.module.name>
  </properties>


  <dependencies>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-quarkus-workflow-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-addons-quarkus-rest-exception-handler</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-cache</artifactId>
    </dependency>
    <dependency>
      <groupId>org.graalvm.nativeimage</groupId>
      <artifactId>svm</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-client-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-multipart-provider</artifactId>
    </dependency>
    <!-- Support CloudEvents OotB -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-addons-quarkus-messaging</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-messaging</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkiverse.reactivemessaging.http</groupId>
      <artifactId>quarkus-reactive-messaging-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-serverless-workflow-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-serverless-workflow-rest-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-jsonpath-expression</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-jq-expression</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkiverse.jackson-jq</groupId>
      <artifactId>quarkus-jackson-jq</artifactId>
    </dependency>
     <dependency>
      <groupId>org.apache.kie.sonataflow</groupId>
      <artifactId>sonataflow-addons-quarkus-openapi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.kie.sonataflow</groupId>
      <artifactId>sonataflow-addons-quarkus-grpc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.kie.sonataflow</groupId>
      <artifactId>sonataflow-addons-quarkus-asyncapi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-services</artifactId>
    </dependency>

  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>src/main/codestarts</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-codestart-jar</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classesDirectory>${project.basedir}/src/main</classesDirectory>
              <includes>
                <include>codestarts/**</include>
              </includes>
              <classifier>codestarts</classifier>
              <skipIfEmpty>true</skipIfEmpty>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-extension-maven-plugin</artifactId>
        <version>${version.io.quarkus}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>extension-descriptor</goal>
            </goals>
            <configuration>
              <deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
              <capabilities>
                <provides>org.apache.kie.sonataflow.serverless-workflow</provides>
              </capabilities>
            </configuration>
          </execution>
        </executions>
      </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>
    </plugins>
  </build>
</project>