<?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.quarkiverse.flow</groupId>
        <artifactId>quarkus-flow-core-parent</artifactId>
        <version>0.10.2</version>
    </parent>
    <artifactId>quarkus-flow</artifactId>
    <name>Quarkus Flow :: Core :: Runtime</name>

    <dependencies>

        <!-- CNCF Java SDK -->
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-http</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-openapi</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-jq</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-model</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-experimental-model</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-lifecycle-events</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-fluent-spec</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-experimental-fluent-func</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-experimental-lambda</artifactId>
        </dependency>
        <dependency>
            <groupId>io.serverlessworkflow</groupId>
            <artifactId>serverlessworkflow-impl-jackson-jwt</artifactId>
        </dependency>

        <!-- Quarkus -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
        </dependency>
         <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.jackson-jq</groupId>
            <artifactId>quarkus-jackson-jq</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-proxy-registry</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.flow</groupId>
            <artifactId>quarkus-flow-messaging</artifactId>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>

        <!-- Required by serverlessworkflow-core-http HttpExecutor service module -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-client-jackson</artifactId>
        </dependency>

        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-fault-tolerance</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-context-propagation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.health</groupId>
            <artifactId>microprofile-health-api</artifactId>
        </dependency>

        <!-- Unit Tests Dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-extension-maven-plugin</artifactId>
                <version>${quarkus.version}</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>extension-descriptor</goal>
                        </goals>
                        <configuration>
                            <conditionalDevDependencies>
                                <artifact>${project.groupId}:${project.artifactId}-dev:${project.version}</artifact>
                            </conditionalDevDependencies>
                            <conditionalDependencies>
                                <dependency>${project.groupId}:${project.artifactId}-messaging:${project.version}
                                </dependency>
                            </conditionalDependencies>
                            <deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}
                            </deployment>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>io.quarkus</groupId>
                                    <artifactId>quarkus-extension-processor</artifactId>
                                </path>
                            </annotationProcessorPaths>
                            <annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <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>
        </plugins>
    </build>
</project>
